Amazon Partner

Tuesday, 21 October 2014

ORA-01033 when connecting to PDB, Pluggable Database ORACLE initialization or shutdown in progress


ORA-01033: ORACLE initialization or shutdown in progress 

ORA-01033: ORACLE initialization or shutdown in progress
01033. 00000 -  "ORACLE initialization or shutdown in progress"
*Cause:    An attempt was made to log on while Oracle is being started up
           or shutdown.

*Action:   Wait a few minutes. Then retry the operation.




Reason: A normal user(non super user) is trying to connect to database in mount/nomount status. Only super user (sys) can connect to database while database in these state. All other has to wait till the point when database is open.

Let's check database status user is connecting to .

12c Database :
select Con_ID,NAME,OPEN_MODE  from V$pdbs where name='PDBORCL' ;

    CON_ID NAME                           OPEN_MODE
---------- ------------------------------ ----------
         3 PDBORCL                        MOUNTED

upto 11g and non CDB 12c.

select instance_name,status from v$instance;

INSTANCE_NAME    STATUS  
---------------- ------------
ORCL             MOUNTED   


Incase of 12c when CDB (Container Database) is started/Open, All the Pluggable databases are not started automatically, instead all PDB's will be mount Status except SEED Database which will be Read only mode.

   CON_ID NAME                           OPEN_MODE
---------- ------------------------------ ----------
         2 PDB$SEED                       READ ONLY
         3 PDBORCL                        MOUNTED


As DBA you need to open the Pluggable database PDBORL to allow access to users

ALTER PLUGGABLE DATABASE PDBORCL OPEN;
OR
ALTER PLUGGABLE DATABASE ALL OPEN;


To avoid starting PDB every time Container database is started, We can write a trigger to open all the pluggable databases.

create or replace trigger OPEN_PDBS
AFTER STARTUP ON DATABASE
begin
execute immediate  'ALTER PLUGGABLE DATABASE ALL OPEN';
end;
/

1 comment:

  1. Newer 12c release also has:

    alter pluggable database save state;

    ReplyDelete