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;





No comments:

Post a Comment