User Tools

Site Tools


database:oracle:pluggable-database

This is an old revision of the document!


Oracle 12 Pluggable database

Auto start a pluggable database when Oracle starts

export ORACLE_HOME=/path/to/db_home
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=GDB_SID - SID of the global database name to connect to the main database - CDB (not pluggable - PDB)
sqlplus / as sysdba

Next, to open a single PDB:

alter pluggable database PDB_NAME open;

To open all PDBs:

alter pluggable database all open;

To keep the PDBs opened after Oracle restart, we need to save their actual opened state:

For just one PDB:

alter pluggable database PDB_NAME save state;

For more PDBs:

alter pluggable database all except PDB_NAME1, PDB_NAME2 save state;

For all PDBs:

alter pluggable database all save state;

Show all pluggable databases status

col NAME FOR a10
SELECT name, open_mode FROM v$pdbs;
 
NAME       OPEN_MODE
---------- ----------
PDB$SEED   READ ONLY
FLPDB      READ WRITE
database/oracle/pluggable-database.1547030817.txt.gz · Last modified: 2023/07/04 19:36 (external edit)