Subscriber Count

    471

Subscribe to Posts by Email

Pages

12.1.0.2: PDB Database Save State

In 12.1.0.1, one must have a trigger or script to open all PDB's once the CDB is restarted. But from 12.1.0.2, there is a new option "Save State" for alter pluggable database command.

Let's test it

This is the status of my PDB's

select name,open_mode from v$pdbs;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
PDB3                           READ WRITE
PDB2                           READ WRITE
PDB1                           READ WRITE

SQL> Alter pluggable database PDB3 save state;

for rac

SQL> Alter pluggable database PDB3 save state instances=all;
Next let’s restart the CDB and see the default state of the PDBs.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
...
Database opened.

 

select name,open_mode from v$pdbs;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
PDB3                           READ WRITE -- only PDB3 has saved state hence its in read write mode.
PDB2                           MOUNTED
PDB1                           MOUNTED

 

-Thanks

Suresh

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>