When you start your container database (CDB), all the PDBs are opened in mounted state by default. So either you have to manually open the PDBs or you can have a script with a trigger at the container level startup event to start all the PDBs automatically.
With Oracle 19c, you have an option called “save state” in which you can save the state or discard the state of the PDBs. “Save State” means, the current state of the PDB is saved across the container startup. This means that if you save the current open read-write state of a PDB, then when you restart your container database, this PDB is automatically opened in read-write mode.
And if you discard the state, then the PDB startup state is reverted to the default setting, which is mount state.
Syntax: (To be executed at the root container )
ALTER PLUGGABLE DATABASE <list of PDBs or ALL> [SAVE STATE | DISCARD STATE];
Example:
SQL> alter pluggable database all save state; Current state of the PDBs are saved
SQL> alter pluggable database all discard state; Discarded the state of the PDB
Watch the below video for a detailed tutorial & demo on this topic.
https://youtu.be/eeyjWbZaAsk
=======================================================================
** Email to info@shreyantech.com to get the Tip of the Day in your mailbox.
** Connect with the author / trainer: https://suchitdba.blogspot.com/p/connect-with-author-database-trainer.html
No comments:
Post a Comment