Managing CDB and PDB Databases

When you startup a CDB, the sequence of operations performed as following:

Instance is started -->Control files are opened --> The root container is opened redo logs and root data files -->The seed pluggable database in READ ONLY mode-->PDBs are stilled in MOUNTED mode--> Triggers can fire to open other PDBs

SQL> alter database cdb1 open;
SQL> alter pluggable database all close;
SQL> alter pluggable database all open;
SQL> alter pluggable database all close;
SQL > alter pluggable database all except GLS close;
SQL> alter pluggable database all open read only;
SQL> select name, open_mode from v$pdbs;

NAME       OPEN_MODE
------------------------------ ----------
PDB$SEED       READ ONLY
PDB1       READ ONLY
PDB2       READ ONLY
GLS       READ ONLY

SQL> alter pluggable database gls close;
SQL> alter pluggable database gls open;
SQL> select * from cdb_pdbs;
SQL > select * from cdb_tablespaces;
SQL> select * from cdb_data_files;
select name, pdb from cdb_services
SQL> select name, open_mode from v$pdbs;

NAME        OPEN_MODE
------------------------------ ----------
PDB$SEED        MOUNTED
PDB1        MOUNTED
PDB2        MOUNTED
GLS        MOUNTED

SQL > select name, pdb, network_name from cdb_pdb;

SQL> connect sys/oracle123@pdb1 as sysdba
Connected.
SQL > show con_name

To be continued...





No comments:

Post a Comment