database:oracle:switch-to-pluggable-db-sqlplus
Switch to a pluggable db (Oracle 12)
After you are connected with sqlplus to a container database (which is happening by default), run the connect command inside your sqlplus session.
conn SYS@PMJ AS SYSDBA
Then you'll be required to enter the SYS password.
- If you use a non dba user, don't specify 'as SYSDBA' clause.
- Here PMJ is the name of the pluggable database.
Another way to switch to a PDB is to change the container:
ALTER SESSION SET container=PMJ;
To go back to the CDB container:
ALTER SESSION SET container=CDB$ROOT;
Connect directly to a pluggable db
sqlplus /nolog connect SNT@PMJ
database/oracle/switch-to-pluggable-db-sqlplus.txt · Last modified: 2023/07/04 19:36 by 127.0.0.1