ORA-01033: Oracle Initialization or Shutdown in Progress
ORA-01033: Oracle Initialization or Shutdown in Progress
Section titled “ORA-01033: Oracle Initialization or Shutdown in Progress”Error Overview
Section titled “Error Overview”Error Text: ORA-01033: ORACLE initialization or shutdown in progress
The ORA-01033 error is returned to a connecting client when the Oracle instance is not yet fully open for normal connections. The instance is either in the process of starting up (sitting in NOMOUNT or MOUNT state, or performing media recovery) or it is in the process of shutting down. Until the startup sequence completes and the database transitions to OPEN status, only privileged SYSDBA/SYSOPER connections are accepted.
This error can also appear when a startup is stuck — for example, a background process has failed or media recovery cannot proceed — leaving the instance in a permanently half-open state.
Common Causes
Section titled “Common Causes”1. Database Still Starting Up (NOMOUNT or MOUNT State)
Section titled “1. Database Still Starting Up (NOMOUNT or MOUNT State)”The instance has been started with STARTUP NOMOUNT or STARTUP MOUNT and has not yet progressed to OPEN. Connections from applications or non-privileged users will fail until ALTER DATABASE OPEN completes.
2. Shutdown in Progress
Section titled “2. Shutdown in Progress”A DBA issued SHUTDOWN, SHUTDOWN IMMEDIATE, or SHUTDOWN TRANSACTIONAL. The instance is draining sessions or waiting for transactions. New connection attempts receive ORA-01033.
3. Background Process Failure During Startup
Section titled “3. Background Process Failure During Startup”A critical background process (SMON, PMON, LGWR, DBWR, CKPT) failed during startup. Oracle halts the startup sequence and the instance sits in a partially open state or terminates and attempts a restart, during which connections fail.
4. Media Recovery Required
Section titled “4. Media Recovery Required”After a crash or incomplete recovery, ALTER DATABASE OPEN requires RESETLOGS or additional recovery steps. The database is mounted but not open; non-SYSDBA connections receive ORA-01033.
5. RAC Instance Not Yet Registered
Section titled “5. RAC Instance Not Yet Registered”In Oracle RAC, a node may be in the middle of instance startup while the listener already has a dynamic service entry from a previous registration. Clients connecting to that node receive ORA-01033 until the instance fully opens.
6. Pluggable Database (PDB) Not Open
Section titled “6. Pluggable Database (PDB) Not Open”In Oracle Multitenant (12c+), the CDB may be open while one or more PDBs are in MOUNT state. Connections to a mounted PDB receive ORA-01033.
Diagnostic Queries
Section titled “Diagnostic Queries”Check Instance and Database Status
Section titled “Check Instance and Database Status”-- Requires SYSDBA connectionSELECT instance_name, status, database_status, active_stateFROM v$instance;
-- Check database open modeSELECT name, db_unique_name, open_mode, log_modeFROM v$database;Check Startup Stage Progress
Section titled “Check Startup Stage Progress”-- View startup/shutdown phases recorded in alert log via ADRSELECT originating_timestamp, message_textFROM v$diag_alert_extWHERE originating_timestamp > SYSDATE - 1/24ORDER BY originating_timestamp DESCFETCH FIRST 50 ROWS ONLY;Check Background Processes
Section titled “Check Background Processes”-- Verify all critical background processes are runningSELECT name, description, pname, stateFROM v$bgprocessWHERE paddr != '00'ORDER BY name;
-- Identify any dead background processesSELECT b.name, b.descriptionFROM v$bgprocess bWHERE b.paddr = '00' AND b.name IN ('SMON','PMON','LGWR','DBWR','CKPT','ARCH');Check PDB Open Status (Multitenant)
Section titled “Check PDB Open Status (Multitenant)”-- Requires connection to CDB$ROOT as SYSDBASELECT con_id, name, open_mode, restrictedFROM v$pdbsORDER BY con_id;Check Active Startup or Recovery Operations
Section titled “Check Active Startup or Recovery Operations”-- Look for outstanding recovery or datafile status issuesSELECT file#, status, error, recover, fuzzy, checkpoint_change#FROM v$datafile_headerWHERE status != 'ONLINE' OR recover = 'YES';
-- Check redo log status during recoverySELECT group#, status, archived, sequence#FROM v$logORDER BY group#;Step-by-Step Resolution
Section titled “Step-by-Step Resolution”1. Connect as SYSDBA to Assess State
Section titled “1. Connect as SYSDBA to Assess State”-- Always start diagnosis with a privileged connectionsqlplus / as sysdba
-- Or from a remote clientsqlplus sys@//hostname:1521/service as sysdba
-- Immediately check where the instance standsSELECT status FROM v$instance;SELECT open_mode FROM v$database;2. Complete a Stalled Startup
Section titled “2. Complete a Stalled Startup”If the instance is in MOUNT state and startup has stopped:
-- If datafiles are consistent, open the databaseALTER DATABASE OPEN;
-- If instance crash recovery is needed, Oracle performs it automatically:ALTER DATABASE OPEN; -- SMON will roll forward/back as needed
-- If media recovery is requiredRECOVER DATABASE;ALTER DATABASE OPEN RESETLOGS;3. Open a Specific PDB (Multitenant)
Section titled “3. Open a Specific PDB (Multitenant)”-- Open a single PDBALTER PLUGGABLE DATABASE pdb_name OPEN;
-- Open all PDBsALTER PLUGGABLE DATABASE ALL OPEN;
-- Save state so PDBs open automatically after future CDB startupsALTER PLUGGABLE DATABASE ALL SAVE STATE;4. Force-Start a Stuck Instance
Section titled “4. Force-Start a Stuck Instance”If a previous shutdown did not complete cleanly and the instance appears stuck:
-- STARTUP FORCE performs a SHUTDOWN ABORT followed by a fresh STARTUPSTARTUP FORCE;
-- If STARTUP FORCE hangs, shut down the OS-level processes first, then start cleanly-- At OS: ps -ef | grep ora_ | grep <SID> -> kill -9 each process-- Then: sqlplus / as sysdba -> STARTUP5. Diagnose Background Process Failures
Section titled “5. Diagnose Background Process Failures”-- Check alert log for the specific background process error-- ADRCI command: show alert -tail 200
-- If LGWR failed, check redo log group statusSELECT group#, status FROM v$log;
-- Clear a corrupt redo log group (only if contents are not needed for recovery)ALTER DATABASE CLEAR LOGFILE GROUP 2;
-- If DBWR failed, check for OS-level I/O errors on datafile paths-- v$datafile_header will show read/write errorsSELECT file#, error FROM v$datafile_header WHERE error IS NOT NULL;6. Handle a Shutdown That Will Not Complete
Section titled “6. Handle a Shutdown That Will Not Complete”-- Check what is blocking the shutdownSELECT sid, serial#, username, status, last_call_et, sql_idFROM v$sessionWHERE username IS NOT NULL AND status = 'ACTIVE'ORDER BY last_call_et DESC;
-- Kill blocking sessions to allow SHUTDOWN IMMEDIATE to completeALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
-- If shutdown remains stuck after killing sessions, escalateSHUTDOWN ABORT;-- Follow immediately with a clean startup to perform crash recovery:STARTUP;Prevention Strategies
Section titled “Prevention Strategies”1. Monitor Startup Completion Automatically
Section titled “1. Monitor Startup Completion Automatically”-- Create a startup trigger to log open time and notifyCREATE OR REPLACE TRIGGER after_db_open AFTER STARTUP ON DATABASEBEGIN INSERT INTO dba_startup_log(startup_time, instance_name) VALUES (SYSDATE, SYS_CONTEXT('USERENV','INSTANCE_NAME')); COMMIT;EXCEPTION WHEN OTHERS THEN NULL;END;/2. Use PFILE/SPFILE Validation Before Startup
Section titled “2. Use PFILE/SPFILE Validation Before Startup”-- Create a PFILE from SPFILE to validate parameters before a restartCREATE PFILE = '/tmp/init_validate.ora' FROM SPFILE;-- Review the file, then start:STARTUP PFILE='/tmp/init_validate.ora';3. Configure Automatic PDB Open on CDB Startup
Section titled “3. Configure Automatic PDB Open on CDB Startup”-- Ensure PDBs open automatically — run once after PDB creationALTER PLUGGABLE DATABASE ALL OPEN;ALTER PLUGGABLE DATABASE ALL SAVE STATE;
-- Confirm saved stateSELECT con_name, state FROM dba_pdb_saved_states;4. Best Practices
Section titled “4. Best Practices”- Always check
V$INSTANCE.STATUSandV$DATABASE.OPEN_MODEbefore concluding a restart is complete - Review the alert log (
$ORACLE_BASE/diag/rdbms/<dbname>/<sid>/trace/alert_<sid>.log) immediately after any unexpected ORA-01033 - Use
SHUTDOWN IMMEDIATErather thanSHUTDOWN ABORTin normal operations to allow clean shutdown and minimize recovery time - In RAC environments, wait for LREG to register services before directing application traffic to a restarted node
- Set
ENABLE_PLUGGABLE_DATABASEandSAVE STATEto avoid forgetting to open PDBs after maintenance
Related Errors
Section titled “Related Errors”- ORA-01034 - Oracle Not Available (instance is completely down)
- ORA-01109 - Database Not Open (connected to unmounted/mounted instance)
- ORA-01012 - Not Logged On (lost session during shutdown)
- ORA-00600 - Internal Error (background process crash)
Emergency Response
Section titled “Emergency Response”Quick Fixes
Section titled “Quick Fixes”-
Check status immediately as SYSDBA
SELECT status, database_status FROM v$instance;SELECT open_mode FROM v$database; -
Open the database if it is in MOUNT
ALTER DATABASE OPEN; -
Force restart a completely stuck instance
SHUTDOWN ABORT;STARTUP;
Post-Resolution Cleanup
Section titled “Post-Resolution Cleanup”-- Confirm database is fully openSELECT name, open_mode FROM v$database;SELECT instance_name, status FROM v$instance;
-- Open any PDBs that remained mountedALTER PLUGGABLE DATABASE ALL OPEN;ALTER PLUGGABLE DATABASE ALL SAVE STATE;
-- Review alert log for the root cause before considering the incident closed-- adrci> show alert -tail 100
-- Gather diagnostic package if background process failure occurredEXEC DBMS_SUPPORT.PACKAGE_FILE('/tmp/oradump', 'DIAG', SYSDATE-1, SYSDATE);