Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What username & password should be entered to use SQL plus

I am using oracle 12c sometimes I need to use SQL plus. When I start sqlplus, it ask me for a username and password enter image description here

I used SYSTEM and SYS as users but don't work with me .Anybody has a solution please

like image 419
Abderrahim Avatar asked Feb 03 '16 10:02

Abderrahim


People also ask

What is an example of a username?

Your username can be your email address, name, or nickname. Usernames can incorporate spaces, numbers, and certain special characters such as periods (.), hyphens (-), apostrophes ('), underscores (_), and the @ sign.

What exactly is your username?

A Username is a special name given to a person to uniquely identify them on a computer network. Also called account names, login IDs, or user IDs, usernames are given to a person by the network administrator or they are selected by the user.

What is username & password?

A password is a string of characters used to verify the identity of a user during the authentication process. Passwords are typically used in tandem with a username; they are designed to be known only to the user and allow that user to gain access to a device, application or website.


2 Answers

Since you are on 12c, if you do not mention the Pluggable database, by default you will connect to the Container database i.e. CDB$ROOT. You need to explicitly mention whether you want to connect to the CDB or the PDB.

Read Oracle 12c Post Installation Mandatory Steps

See,

C:>sqlplus

SQL*Plus: Release 12.1.0.1.0 Production on Wed Feb 3 16:41:44 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Enter user-name: system
Enter password:
Last Successful login time: Wed Feb 03 2016 16:39:42 +05:30

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt
ions

SQL> show con_name

CON_NAME
------------------
CDB$ROOT

CDB$ROOT which means I am connected to CDB.

Let's connect to the PDB:

SQL> alter session set container=pdborcl;

Session altered.

SQL> show con_name

CON_NAME
------------------
PDBORCL

You should tell Oracle whether you need to connect to CDB or PDB:

sqlplus username/password@service_name
like image 120
Lalit Kumar B Avatar answered Sep 19 '22 10:09

Lalit Kumar B


Use this command in terminal or cmd sqlplus /nolog. This is mentioned in Oracle Database Administrator’s Guide

Start SQL*Plus and connect to your Oracle Database instance with the SYSDBA system privilege. To authenticate with a password file, enter the following commands, and then enter the SYS password when prompted:

  • $ sqlplus /nolog
  • SQL> CONNECT SYS AS SYSDBA

This should help!

like image 24
Pavlo Chechehov Avatar answered Sep 18 '22 10:09

Pavlo Chechehov