Wednesday, February 10, 2016

12c: open & close Pluggable databases

Command to list the all pluggable databases and open_mode on container database

donot confuse pdb$seed is the template to create new pluggable databases
we have only 1 pluggable database RED on container database and it is in mounted state 


SQL> select name, open_mode from v$pdbs;
NAME          OPEN_MODE
--------------- ----------
PDB$SEED     READ ONLY
RED              MOUNTED

command to open pluggable database 'RED'

SQL> alter pluggable database red open;

SQL> select name, open_mode from v$pdbs;
NAME          OPEN_MODE
--------------- ----------
PDB$SEED     READ ONLY
RED              READ WRITE

command to close pluggable database RED on container database

SQL> alter pluggable database red close immediate;

SQL> select name, open_mode from v$pdbs;
NAME          OPEN_MODE
--------------- ----------
PDB$SEED     READ ONLY
RED              MOUNTED

command to close all pluggable databases on container database 

SQL>  alter pluggable database all close immediate;

SQL> select name, open_mode from v$pdbs;
NAME          OPEN_MODE
--------------- ----------
PDB$SEED     READ ONLY
RED              MOUNTED

command to open all pluggable databases on container database 

SQL> alter pluggable database all open;
Pluggable database altered.

SQL>  select name, open_mode from v$pdbs;
NAME               OPEN_MODE
--------------- ----------
PDB$SEED       READ ONLY
RED                   READ WRITE

Note: when ever we start container database, all of our pluggable databases are in mount state. we have to open them manually or we can place a trigger on container database which will open all pluggable databases after bouncing the database on the server 

--Nikhil Tatineni--
--12c: Pluggable databases-- 







Querys to monitor RAC

following few  Query's will help to find out culprits-  Query to check long running transaction from last 8 hours  Col Sid Fo...