Translate

Sunday 29 March 2015

12.1.0.2 - Pluggable Database Automatic Restart

Pluggable Database Automatic Restart - 12.1.0.2

In Oracle 12c if we shutdown or startup the database only the container database starts in READWRITE mode. All the pluggable database remain in MOUNT state.





















We need to use ALTER PLUGGABLE DATABASE ALL OPEN to open all the PDBS.



As of 12,1.0.1 to automatically start the PDBS in READ WRITE mode we need enable a trigger .

In 12.1.0.2 Oracle has introduced a new way of starting the PDBS.

 alter pluggable database PDBNAME save state;

Lets test the feature.























To save the state of all PDB's we can use the below command

ALTER PLUGABBLE DATABASE ALL SAVE STATE;










Let's shutdown the database and check if PDB's open in READ WRITE Mode automatically.
























All Pluggable Databases have automatically started in READ WRITE mode.

We can view the DBA_PDB_SAVED_STATES to view the saved state.

select CON_NAME,INSTANCE_NAME,STATE from dba_pdb_saved_states;









In case if you feel that you need to remove the save states we have an option for that as well.

ALTER PLUGGABLE DATABASE ALL DISCARD STATE;

Lets test this as well.


No comments:

Post a Comment