Oracle 12C: Pluggable database will not start in opened mode by default

Once server rebooted. oratab has set to "N". Upon starting up the database instance, it did not start my pluggable database. It has to be started up explicitly.

[oracle@oracle12c ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.1.0.1.0 Production on Tue Oct 15 09:11:18 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 5027385344 bytes
Fixed Size                  2691952 bytes
Variable Size            1090522256 bytes
Database Buffers         3925868544 bytes
Redo Buffers                8302592 bytes
Database mounted.
Database opened.



SQL> show con_name;

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



Here, I have create a new pluggable database and then bouncing the database. Pluggable database will come up as MOUNTED mode instead of READ/WRITE mode. DBA should verify and bring it up explicitly.


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDBORCL                        MOUNTED
SQL> alter session set container=PDBORCL;

Session altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 PDBORCL                        MOUNTED

SQL> startup

Pluggable Database opened.


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 PDBORCL                        READ WRITE NO

SQL> quit

Pluggable database is in READ/WRITE mode now. Just remember that, this will need its own services in the tnsnames.ora otherwise, it will not take any outside connections.

Example of error if pdborcl did not get added to the tnsnames.ora.

SQL> conn vpx3/mypassword@pdborcl

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

<<<< add the new entry to tnsnames.ora >>>>>


SQL>  conn vpx3/mypassword@pdborcl
Connected.
SQL>

In summary, seeds will always READ ONLY. PDB will always start up as MOUNTED only. It has to be explicitly opened once bounced.

No comments:

Post a Comment