SQL*Plus: Release 19.0.0.0.0 - Production on Sat Dec 26 20:32:30 2020
Version 19.6.0.0.0
ORACLE instance started.
Total System Global Area 5368705960 bytes
Fixed Size 9159592 bytes
Variable Size 2315255808 bytes
Database Buffers 2936012800 bytes
Redo Buffers 108277760 bytes
CON_NAME
------------------------------
CDB$ROOT
SQL> select name,open_mode,con_id,dbid from v$containers;
no rows selected
No CDB or PDBs info at NOMOUNT state. NOMOUNT use for re-create or restore a missing control file for the CDB instance.
SQL> alter database mount;
Database altered.
SQL> select name,open_mode,cdb from v$database;
NAME OPEN_MODE CDB
------------------------------ -------------------- ---
CJTED MOUNTED YES
SQL> SELECT con_id, name, open_mode FROM v$pdbs;
CON_ID NAME OPEN_MODE
---------- ------------------------------ ----------
2 PDB$SEED MOUNTED
3 PJTED1 MOUNTED
4 PJTED2 MOUNTED
CDB’s control files opened for the instance, but both the CDB$ROOT and all PDBs are changed to the MOUNT state.
SQL> alter database open; or alter database CJTED open;
Database altered.
SQL> select name,open_mode,con_id,dbid from v$containers;
NAME OPEN_MODE CON_ID DBID
------------------------------ ---------- ---------- ----------
CDB$ROOT READ WRITE 1 105692156
PDB$SEED READ ONLY 2 657829016
PJTED1 READ WRITE 3 1002662416 >>> Oracle 12.2
PJTED2 READ WRITE 4 531562146
SQL> SELECT con_name, instance_name, state FROM dba_pdb_saved_states; >>> Oracle 12.2
no rows selected
CDB$ROOT is OPEN, it’s available for READ and WRITE operations.
All PDBs are still READ WRITE with the seed database PDB$SEED mounted as READ ONLY:
dba_pdb_saved_states is valid for Oracle 12.1
========================= shutdown ================================
SQL> ALTER PLUGGABLE DATABASE ALL CLOSE IMMEDIATE;
Pluggable database altered.
SQL> select name,open_mode,con_id,dbid from v$containers;
NAME OPEN_MODE CON_ID DBID
------------------------------ ---------- ---------- ----------
CDB$ROOT READ WRITE 1 105692156 >>>> ROOT
PDB$SEED READ ONLY 2 657829016 >>>> SEED
PJTED1 MOUNTED 3 1002662416
PJTED2 MOUNTED 4 531562146
CSTG1 MOUNTED 5 2604502831
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.