Monday, July 7, 2014

Automatically Starting Pluggable Databases

At this time, Oracle has not provided a way of auto-starting pluggable databases in a multitenant environment.

 

This has the effect that should you need to restart your container database (CDB), then you must also connect to it, in order to manually restart the pluggables, otherwise they’ll sit in mounted state forever.

 

To avoid this ,try something like the following. You may add something a bit more clever to check the state of the database so that it only starts them under certain circumstances, and light include a table containing a single row per PDB with a preset indicator that you can control what will restart the next time the database opens.

 

CREATE or REPLACE trigger START_PLUGGABLES

   after startup on database

BEGIN

   execute immediate 'alter pluggable database all open';

END start_pluggables;

/

 

Happyjohn.

No comments:

Post a Comment