Total Pageviews

How to restart Oracle 12c Database with Pluggable Database (PDBs)

Purpose: This post explains the method to shutdown and restart the Oracle 12c Database with PDB

Steps:

  1. Connect to root container CDB$root
  2. Stop (all/one by one) pluggable database/s
  3. Shutdown container Database
  4. Startup  container Database.
  5. Check all the pluggable databases in mount state
  6. Startup (all/one by one) pluggable database
Detailed steps:

1- Connect to root container CDB$root


$ export ORACLE_HOME=<set oracle home of Oracle 12c database>
$ export ORACLE_HOME=<DB_SID_Name>
SQL> sqlplus "/ as sysdba" 

2- Stop (all/one by one) pluggable database/s
     
    One - by-one close PDBs 
    SQL> alter pluggable database <PDB name> close immediate; 
  
  Close all PDBs
     SQL> alter pluggable database all close immediate;

3- Shutdown container Database
    SQL> shutdown immediate

4-  Startup  container Database.

  $ export ORACLE_HOME=<Path Oracle 12c database>
  $ export ORACLE_HOME=<DB_SID_Name>
  SQL> startup 

5-  Check all the pluggable databases in mount state
     
 SQL> select name,open_mode from v$pdbs;

6- Startup (all/one by one) pluggable database

   One - by-one open PDBs:  

  SQL> alter pluggable database <PDB name> open; 
  
  Open all PDBs

  SQL> alter pluggable database all open;

---------------------------------------------- The End ---------------------------------------------- 

No comments:

Post a Comment