Oracle 12C: Opening up pluggable PDB from root all at once.

Just discovered this capability today from another production database of mine. Pretty handy, if one has 20 tiny databases to open all at once.  Didn't get it right the first time. I kept thinking the synax "alter pluggable database open all" instead.


alter pluggable database all open;




SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORACLE instance started.

Total System Global Area 5027385344 bytes
Fixed Size                  3478384 bytes
Variable Size            1258294416 bytes
Database Buffers         3758096384 bytes
Redo Buffers                7516160 bytes
Database mounted.
Database opened.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDBORCL                        MOUNTED
         4 PDBVCDB                        MOUNTED
         5 PDBNEWDB                       MOUNTED



SQL> show con_name;

CON_NAME
------------------------------
CDB$ROOT


SQL>  alter pluggable database all open;
Pluggable database altered.

SQL>  show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDBORCL                        READ WRITE NO
         4 PDBVCDB                        READ WRITE NO
         5 PDBNEWDB                       READ WRITE NO

No comments:

Post a Comment