Archive for September 2014

Why can’t I connect to my pluggable database?   Leave a comment

This afternoon one of my colleagues was having trouble connecting his database. He got the following error when he

tried to connect the application to the database:

ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Process ID: 0
Session ID: 0 Serial number: 0

He logged to the database server host and found that the database instance was up and he was able to connect to the database instance :

SQL> connect system/password
Connected.

But when he tried to connect to the application user  in a PDB:

[oracle@inmem2 ~]$ sqlplus  user1/user1pwd@app1_pdb

SQL*Plus: Release 12.1.0.2.0 Production on Mon Sep 15 16:48:13 2014

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

ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Process ID: 0
Session ID: 0 Serial number: 0

Here is the troubleshooting part that I did:

check if the PDB is up:

sqlplus  / as sysdba

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> select NAME, OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
—————————— ———-
PDB$SEED                       READ ONLY
APP1_PDB                      MOUNTED

So the APP1_PDB is only mounted not open although the instance is up and the container CDB is open.

So we need to open the PDB:

SQL> alter PLUGGABLE  DATABASE APP1_PDB open;

Pluggable database altered.

check the PDB open status:

SQL> select NAME, OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
—————————— ———-
PDB$SEED                       READ ONLY
APP1_PDB                      READ WRITE

Then he was able to login to the PDB:

SQL> connect user1/user1pwd@app1_pdb
Connected.

For more details about how to manage pluggable database, especially in Oracle RAC environment, check my presentation at Collaborate 14:

Oracle RAC 12c Flex Architecture and RAC support for Multitenant Architecture, May 27, 2014

https://kyuoracleblog.files.wordpress.com/2014/05/achieving-availability-and-scalability-with-oracle-12c-flex-clusters-and-flex-asm.pdf

and even more details on Apress Book “Expert Oracle RAC 12c ” Chapter 4 :New Features in RAC 12c which I co-authored.