How to open the PDBS automatically when CDB restarts DBACLASS
How to open the PDBS automatically when CDB restarts . From oracle 12.1.0.2 , saved state feature introduced, which can helps in ..
oracle clusteringintermediate
by OracleDba
14 views
How to open the PDBS automatically when CDB restarts . From oracle 12.1.0.2 , saved state feature introduced, which can helps in ..
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1.4529E+10 bytes
Fixed Size 7649368 bytes
Variable Size 8489273256 bytes
Database Buffers 5939134464 bytes
Redo Buffers 93011968 bytes
Database mounted.
Database opened.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 MOUNTED
4 PDB2 MOUNTED
5 NONCDB MOUNTED
SQL> alter pluggable database NONCDB open;
Pluggable database altered.
SQL> alter pluggable database PDB1 open;
Pluggable database altered.
SQL> alter pluggable database PDB2 open;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
4 PDB2 READ WRITE NO
5 NONCDB READ WRITE NO
SQL> alter pluggable database NONCDB save state;
Pluggable database altered.
SQL> alter pluggable database PDB1 save state;
Pluggable database altered.
SQL> alter pluggable database PDB2 save state;
Pluggable database altered.
SQL> select con_name, state from dba_pdb_saved_states;
CON_NAME STATE
----------------------- --------------
NONCDB OPEN
PDB1 OPEN
PDB2 OPEN
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1.4529E+10 bytes
Fixed Size 7649368 bytes
Variable Size 8489273256 bytes
Database Buffers 5939134464 bytes
Redo Buffers 93011968 bytes
Database mounted.
Database opened.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
4 PDB2 READ WRITE NO
5 NONCDB READ WRITE NO
SQL> select con_name, state from dba_pdb_saved_states;
CON_NAME STATE
----------------------- --------------
NONCDB OPEN
PDB1 OPEN
PDB2 OPEN
SQL> alter pluggable database PDB2 discard state;
Pluggable database altered.
SQL> select con_name, state from dba_pdb_saved_states;
CON_NAME STATE
----------------------- --------------
NONCDB OPEN
PDB1 OPEN
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
4 PDB2 READ WRITE NO
5 NONCDB READ WRITE NO
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1.4529E+10 bytes
Fixed Size 7649368 bytes
Variable Size 8489273256 bytes
Database Buffers 5939134464 bytes
Redo Buffers 93011968 bytes
Database mounted.
Database opened.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
4 PDB2 MOUNTED
5 NONCDB READ WRITE NOPlease to add comments
No comments yet. Be the first to comment!