ORA-39700: database must be opened with UPGRADE option

Fix ORA-39700 after database restore. Learn how to open Oracle in UPGRADE mode and run catupgrd.sql to resolve ORA-01092 and ORA-00704 errors.

Introduction

If you encounter the error:
SQL> startup
ORACLE instance started.

Total System Global Area 1.2831E+10 bytes
Fixed Size                  2193544 bytes
Variable Size            1778386808 bytes
Database Buffers         1.1039E+10 bytes
Redo Buffers               11214848 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 1889
Session ID: 1134 Serial number: 3
while starting your Oracle database, don’t panic.

This is a common yet critical issue that occurs due to a mismatch between the database dictionary and Oracle binaries.

In this blog, we will cover:

  • Root cause (internals)
  • Real-world scenarios
  • Step-by-step solution
  • Verification queries
  • Best practices


Error Explanation

  • ORA-39700 → Database needs to be opened in UPGRADE mode
  • ORA-00704 → Bootstrap process failed (due to incomplete upgrade)
  • ORA-01092 → Instance terminated automatically

Root Cause

This error occurs due to a data dictionary version mismatch.

What happens internally?

  • Oracle binaries (software version) are newer
  • Database dictionary is still older version
  • During startup:
  1. Oracle tries to load dictionary
  2. Detects mismatch
  3. Stops startup for safety

Common Scenarios

1. Restore to Higher Version Server

  • Backup taken from lower version
  • Restored on higher Oracle version
  • Dictionary not upgraded

2. Wrong ORACLE_HOME

  • Database started using incorrect binaries
  • Version mismatch triggers error

3. Incomplete Upgrade / Patch

  • Upgrade started but not completed
  • Dictionary remains inconsistent

4. Clone / Test Environment Issues

  • Production copied to test server
  • Environment mismatch

Solution: Fix ORA-39700 Error

Follow these steps carefully:

Step 1: Start Database in Upgrade Mode

$ sqlplus / as sysdba
SQL> STARTUP UPGRADE;
Opens the database in upgrade mode

Step 2: Run Full Upgrade Script

SQL> @?/rdbms/admin/catupgrd.sql
Important:
  • Updates data dictionary
  • Takes 10–30+ minutes
  • Do NOT interrupt

Step 3: Recompile Invalid Objects

SQL> @?/rdbms/admin/utlrp.sql
Ensures all objects are valid

Step 4: Restart the Database

SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP;
Database should now open successfully

Verification Steps

After upgrade, verify database status:
SQL> SELECT * FROM v$version;
SQL> SELECT comp_name, version, status FROM dba_registry;

Quick Troubleshooting Table

Scenario Cause Solution
Restore to higher version Dictionary mismatch Run upgrade
Wrong ORACLE_HOME Binary mismatch Correct environment
Patch incomplete Upgrade not finished Re-run upgrade
Clone DB issue Version inconsistency Upgrade DB

Why This Happens?

This issue typically occurs when:
  • Database restored on a different environment
  • Patch level mismatch
  • Upgrade scripts were not executed
  • Incomplete data dictionary upgrade

Conclusion: If you encounter ORA-39700 after restoring a database, it means the database must be opened in UPGRADE mode and completed with upgrade scripts.

Running catupgrd.sql and recompiling objects will resolve the issue and allow normal database startup.

Post a Comment

© Ayaan Israr - All rights reserved. Premium By Ayaan Israr