Professional Documents
Culture Documents
Ed Chen Logic
To Make My Logic More Logical
Authentication Multitenant
Ad removed.
Details
Connect as SYSDBA
We usually connect to the database by / as SYSDBA without providing any password for
maintenance works, such as startup, shutdown and backup. This is because we are in OSDBA or
OSOPER group, so we are naturally authenticated at OS-level and don't have to provide password
to login.
Connect to a PDB
In multitenant environments, the thing becomes a little different, we can still connect to Container
Database (CDB) without password by the traditional way, but not Pluggable Database (PDB).
If we want to connect to a PDB, we usually provide a connection string which includes credentials
and a tnsname to login.
...
COUNT(*)
----------
107 New! Instructor-made content
https://logic.edchen.org/how-to-connect-a-pdb-directly-by-os-authentication/ 1/6
11/14/22, 9:07 AM Connect to PDB as SYSDBA by ORACLE_PDB_SID - Ed Chen Logic
A problem comes, how do we connect to the pluggable database (PDB) without any password?
Let's see the second case.
...
CON_NAME
------------------------------
CDB$ROOT
Session altered.
CON NAME
As you can see, we set container in session in order to get into PDB. Honestly, both cases are
somewhat inconvenient, we want to connect to the PDB directly by OS authentication without
password.
Use ORACLE_PDB_SID
Since 18c, we have another scheme to connect to a PDB directly without password. The secret
ingredient is set an additional environment variable ORACLE_PDB_SID to let Oracle know what
PDB we want to directly connect to.
ORCLCDB
...
CON_NAME
------------------------------
ORCLPDB
COUNT(*)
It's extremely useful when we want to directly export data from a PDB without providing any
password. Moreover, utilities that need authentication are all applicable to this case. For example,
using RMAN to backup tablespaces belong to a PDB.
If you found that you still can't do this in 18c or 19c database, maybe you should consider to apply
Database Release Update (DBRU) on Oracle database 19c.
https://logic.edchen.org/how-to-connect-a-pdb-directly-by-os-authentication/ 2/6
11/14/22, 9:07 AM Connect to PDB as SYSDBA by ORACLE_PDB_SID - Ed Chen Logic
Ad removed.
Details
Tags: ALTER PLUGGABLE DATABASE Container Database (CDB) Database Release Update (DBRU)
PREVIOUS NEXT
How to expdp PDB as SYSDBA How to Resolve ORA-39195: At least one schema in the
without Password TABLE_FILTER does not exist.
Leave a Reply
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
New! Instructor-made content
https://logic.edchen.org/how-to-connect-a-pdb-directly-by-os-authentication/ 3/6
11/14/22, 9:07 AM Connect to PDB as SYSDBA by ORACLE_PDB_SID - Ed Chen Logic
Save my name, email, and website in this browser for the next time I comment.
POST COMMENT
Search for...
★ By Pressing Ctrl + D
Recent Posts
Give your
degree
your all
Subscribe
Categories
Select Category
Recent Comments
https://logic.edchen.org/how-to-connect-a-pdb-directly-by-os-authentication/ 5/6
11/14/22, 9:07 AM Connect to PDB as SYSDBA by ORACLE_PDB_SID - Ed Chen Logic
Meta
Log in
Entries feed
Comments feed