Saturday, August 3, 2013

Startup and Shutdown of a Container Database

In this demo I show how to shutdown and start the container database. I also show what you need to do with your pluggable databases after a restart.

Shutdown Container (CDB)

Connect to CDB
$sqlplus / as sysdba
SQL>shutdown immediate









Start-up Container (CDB)

Connect to CDB
$sqlplus / as sysdba
SQL>startup






Check Pluggable Databases (PDB)

Connect to CDB
$sqlplus / as sysdba
SQL>set linesize 100
col open_time format a25
select con_id,name,open_mode,open_time,ceil(total_size)/1024/1024 total_size_in_mb from v$pdbs
order by con_id asc;

Note: After you restart the CDB your PDBs will be in a mounted state you need to open the PDBs.


















Open Pluggable Databases (PDB)

Connect to the CDB
$sqlplus / as sysdba
SQL>alter pluggable database all open;



Note: If you just want to open one pluggable database you can use the following.
SQL>alter pluggable database <pdb_name> open;

Check Pluggable Databases (PDB)

Connect to CDB
$sqlplus / as sysdba
SQL>set linesize 100
col open_time format a25
select con_id,name,open_mode,open_time,ceil(total_size)/1024/1024 total_size_in_mb from v$pdbs
order by con_id asc;

We can see after issuing the open state on all pluggable databases the open mode changes to read write.
















Check Services

$sqlplus / as sysdba
SQL>col name format a20
col network_name format a20
select con_id,con_name,name,network_name from v$active_services
order by con_id asc;





1 comment:

  1. ORACLE DATABASE 12C CLUSTERWARE ADMINSTRATION
    This Oracle Database 12c: Cluster ware Administration training will explore general cluster concepts and Oracle Cluster ware architecture. Work with expert Oracle University instructors through interactive instruction and hands-on exercises to reinforce your learning. Oracle Cluster ware is the cross platform cluster software required to run the Real Application Clusters (RAC) option for Oracle Database. It provides the basic clustering services at the operating system level that enable Oracle software to run in clustering mode. In earlier versions of Oracle (version 9i and earlier), RAC required a vendor supplied cluster ware like Sun Cluster or Veritas Cluster Server with the exception of Linux and Windows.
    Benefits:
    Learn how to make applications highly available using Oracle Cluster ware. You'll walk away with the ability to install,configure, manage and troubleshoot both standard and flex clusters. Furthermore, you will have developed the skills toupgrade and patch Cluster ware environments.
     To join Online Training session kindly feel free to contact with us
     Name - saurabh srivastava
     Email - id - saurabh@maxmunus.com
     Contact No. - +91 -8553576305
     Skype- saurabhmaxmunus
     Company Website - http://www.maxmunus.com

    ReplyDelete

About Me

My photo

Senior DBA with over 16 years experience, specializing in "Database Performance Tuning" and High Availability (RAC, Data Guard & Oracle Golden Gate).