Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
We will start off by looking at the normal result of a CDB restart. Notice the PDBs are in READ WRITE mode before the restart, but
in MOUNTED mode after it.
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB1 READ WRITE
PDB2 READ WRITE
SQL>
SHUTDOWN IMMEDIATE;
STARTUP;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB1 MOUNTED
PDB2 MOUNTED
SQL>
Next, we open both pluggable databases, but only save the state of PDB1.
https://oracle-base.com/articles/12c/multitenant-startup-and-shutdown-cdb-and-pdb-12cr1#preserve-pdb-startup-state 1/3
20/6/2018 ORACLE-BASE - Multitenant : Startup and Shutdown Container Databases (CDB) and Pluggable Databases (PDB) in Oracle Database 12c Release 1 (12.1)
The DBA_PDB_SAVED_STATES view displays information about the saved state of containers.
SQL>
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB1 READ WRITE
PDB2 READ WRITE
SQL>
SHUTDOWN IMMEDIATE;
STARTUP;
https://oracle-base.com/articles/12c/multitenant-startup-and-shutdown-cdb-and-pdb-12cr1#preserve-pdb-startup-state 2/3
20/6/2018 ORACLE-BASE - Multitenant : Startup and Shutdown Container Databases (CDB) and Pluggable Databases (PDB) in Oracle Database 12c Release 1 (12.1)
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB1 READ WRITE
PDB2 MOUNTED
SQL>
no rows selected
SQL>
Here is a brief list of some of the usage notes explained in the documentation.
The state is only saved and visible in the DBA_PDB_SAVED_STATES view if the container is in READ ONLY or READ WRITE mode.
The ALTER PLUGGABLE DATABASE ... SAVE STATE command does not error when run against a container in MOUNTED mode, but
nothing is recorded, as this is the default state after a CDB restart.
Like other examples of the ALTER PLUGGABLE DATABASE command, PDBs can be identified individually, as a comma separated list,
using the ALL or ALL EXCEPT keywords.
The INSTANCES clause can be added when used in RAC environments. The clause can identify instances individually, as a comma
separated list, using the ALL or ALL EXCEPT keywords. Regardless of the INSTANCES clause, the SAVE/DISCARD STATE commands
only affect the current instance.
For more information see:
https://oracle-base.com/articles/12c/multitenant-startup-and-shutdown-cdb-and-pdb-12cr1#preserve-pdb-startup-state 3/3