Retain Database PDB State on Startup or Shutdown of CDB database
You can retain the OPEN State of PDBs database when ever the CDB goes down and started again.
If you PDB is shutdown at time then it remain shutdown. If PDB is in Open state then it remain in OPen after CDB reboot.
In old version, when CDB is rebooted it brings all PDB database in Mount state.
Note: This feature available from 18.104.22.168
Keyword SAVE STATE to preserve the PDBs’ mode when the CDB is restarted.
Keyword DISCARD STATE to ignore the PDBs’ open mode when the CDB is restarted.
Check the Saved States of PDBs in a CDB:
SELECT * FROM DBA_PDB_SAVED_STATES;
Use in following ways of PDBs:
Specify ALL to modify all of the PDBs.
Specify ALL EXCEPT to modify all of the PDBs, except for the PDBs listed.
Preserve Open Mode of PDB Database
ALTER PLUGGABLE DATABASE PDB1 SAVE STATE;
Discarding the Open Mode of a PDB
ALTER PLUGGABLE DATABASE PDB1 DISCARD STATE;
Preserving the Open Mode of All PDBs
ALTER PLUGGABLE DATABASE ALL SAVE STATE;
Preserving the Open Mode of Multiple PDBs
ALTER PLUGGABLE DATABASE PDB1 , PDB2 SAVE STATE;
Preserving the Open Mode of All PDBs Except
ALTER PLUGGABLE DATABASE ALL EXCEPT PDB3, PDB4 SAVE STATE;
In Case Of RAC CDB, use the instances clause in the pdb_save_or_discard_state clause for specify the instances on which a PDB’s open mode is retained.