Tuesday, August 17, 2021

Startup and Shutdown of a Container Database

 Startup and Shutdown of a Container Database



start and Shutdown Databases :-

SHUTDOWN CONTAINER DATABASES

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.

CDB CONNECT




Open Pluggable Databases (PDB)


Connect to 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.

PDB CONNECT 




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;


CON_ID CON_NAME             NAME                 NETWORK_NAME
---------- -------------------- -------------------- --------------------
         1 CDB$ROOT             SYS$USERS
         1 CDB$ROOT             FNSTCDBXDB            FNSTCDBXDB
         1 CDB$ROOT             FNSTCDB               FNSTCDB
         1 CDB$ROOT             SYS$BACKGROUND
         3 FNST20               FNST20_ebs_patch     FNST20_ebs_patch
         3 FNST20               fnst20               fnst20
         3 FNST20               ebs_FNST20           ebs_FNST20

7 rows selected.





Ref:- http://db12c.blogspot.com/



No comments: