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;
col NAME FOR a10 SELECT name, open_mode FROM v$pdbs; NAME OPEN_MODE ---------- ---------- PDB$SEED READ ONLY FLPDB READ WRITE