Introduction
In this post I'd like to review a very useful feature that was introduced in version 12.1.0.2 - PDB State Management Across CDB Restart. In version 12.1.0.1, after instance restart you will notice that the Pluggable Databases (PDBs) are MOUNTED, i.e. they are not accesible to the users. It doesn't matter if before the restart the PDB was MOUNTED or OPEN, in any case after the restart it will be MOUNTED. let's see a demonstartion for that:
This means that after every restart of the instance DBA need to manually start the Pluggable Databases in order to make it accessible to the users.
12.1.0.2 solution - "Save State" clause
The solution for this behaviour was introduced with version 12.1.0.2 which provides an option to execute a command that will set the state of a PDB so in the next time that the instance will be started, the open mode of that PDB will be remains the same as it was when we executed the ALTER PLUGGABLE DATABASE ... SAVE STATE command. Let's see a demonstration
As you can see, after I exectued "ALTER PLUGGABLE DATABASE ... SAVE STATE" command, the PDB open mode remains the same (OPEN) after I restarted the instance.
Few Notes:
- You can query DBA_PDB_SAVED_STATES dictinoary view which shows information about the current saved PDB states in the CDB.
- You can discard the state of a PDB in order to make the open mode mounted again in the next instance reboot. Below is a demonstartion of this:
Nice blog you have, thanks for posting
ReplyDelete