Knowledge Base

Database is not open for queries, it is still in startup or shutdown phase

ORA-01033: ORACLE initialization or shutdown in progress

A shutdown, shutdown immediate or startup command was issued by someone with SYSDBA privileges.
As a result, the database is being either shutdown or restarted.
You will have to wait until the database was shutdown or startup properly.
Following gives an example on the startup phase of the database.
We are connecting to the database and receive the ORA-01033 error:

H:\>sqlplus system/xxx

SQL*Plus: Release 11.1.0.6.0 - Production

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

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

Now, as a user with SYSDBA privileges, we are going to restart the database.
First check the status of the instance and database.

Enter user-name: / as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select status, database_status from v$instance;

STATUS       DATABASE_STATUS
------------ -----------------
STARTED      ACTIVE

SQL> select open_mode from v$database;
select open_mode from v$database
                      *
ERROR at line 1:
ORA-01507: database not mounted

we can see that the instance was started ok, but the database was not mounted.

Let’s check if we can mount the database, if this succeeds, then there is not problem with the data files (accessible, not corrupt, doesn’t need recovery, …)

SQL> alter database mount;

Database altered.

SQL> select status, database_status from v$instance;

STATUS       DATABASE_STATUS
------------ -----------------
MOUNTED      ACTIVE

SQL> select open_mode from v$database;

OPEN_MODE
----------
MOUNTED

Now we have a mounted database, but when you try to connect, you would still get the ORA-01033 error:

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Pr
oduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options

H:\>sqlplus system/xxx

SQL*Plus: Release 11.1.0.6.0 - Production

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

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

We need to make sure we open the database in read write mode before we can connect.
Again, login as a user with SYSDBA privileges and open the database:

Enter user-name: / as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> alter database open;

Database altered.

SQL> select status, database_status from v$instance;

STATUS       DATABASE_STATUS
------------ -----------------
OPEN         ACTIVE

SQL> select open_mode from v$database;

OPEN_MODE
----------
READ WRITE

The database is open in read write mode, and our instance is telling we can use the database. We are now able to login.

Should you getting others errors when trying to mount or open the database, look up the error code in order to identify and rectify the problem.

Problem that can arise when trying to mount or open the database are:

  • ORA-00214: control file ‘%s’ version %s inconsistent with file ‘%s’ version %s
  • Inconsistent datafiles -> recovery needed
  • Missing datafiles, redolog files, controlfiles -> recover from backup
  • jayanth

    i cant mount the database…
    >alter database mount

    ERROR at line 1:

    ORA-00214: controlfile ‘D:ORACLEORADATAORACLECONTROL02.CTL’ version 27848

    inconsistent with file ‘D:ORACLEORADATAORACLECONTROL01.CTL’ version 27844

  • Okasha

    but there is a problem ORA-00600 AFTER THIS
    PLZZZZZZ ANSWER

  • Jens

    awesome guys …. many thanks, this really helped

  • Steve Wallace

    Hi Wim,

    My problem is that I can’t connect at all.  I only get the ORA-01033 no matter what.  I deleted the database and restored a copy but it’s just a folder copy so the db is on the wrong state.  I can open SQL Plus with /nolog but that’s it. 
    I’m not an Oracle DBA.  Any hope?

    • http://dbmotive.com/ Wim Jans

      Could you please email your alert[ORACLE_SID].log file to support@dbmotive.com, and I’ll have a look

Oracle Gold Partner DbMotive is an Oracle Gold Partner