I am using oracle 12c sometimes I need to use SQL plus. When I start sqlplus, it ask me for a username and password
I used SYSTEM and SYS as users but don't work with me .Anybody has a solution please
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.
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.
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.
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
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With