Skip to main content

Oracle DTC Restore completed but job failed with ORA-39700 database must be opened with UPGRADE option

Oracle DTC Restore completed but job failed with ORA-39700 database must be opened with UPGRADE option

Updated this week

Problem Description:

  • An Oracle restore job completes the data transfer phase successfully, but the overall job is marked as "Failed" with an ORACLE_DTC 5 error code.

  • The detailed error message indicates an RMAN failure and points to a specific Oracle error: ORA-39700: database must be opened with UPGRADE option.

Cause:

  • This is the expected and correct behavior when restoring an Oracle database to a target server that is running a higher major version of Oracle than the source (for example, restoring a version 12c database to a 19c environment).

  • The restore process itself, which involves copying the physical data files, completes successfully.

  • However, the database cannot be opened for normal use because its internal data dictionary is still at the older version (12c).

  • Oracle prevents the database from opening in a standard read-write mode to protect it from corruption. The ORA-39700 error is intentionally triggered to force the database administrator to perform the necessary post-restore upgrade steps.

Traceback / Logs:

The job status and RMAN logs will clearly show the following error after the physical restore is complete:

RMAN error occurred on the Oracle server. Check RMAN logs for details. [RMAN failure. ORA-39700: database must be opened with UPGRADE option]

The RMAN output will show that media recovery has finished, but the subsequent attempt to open the database triggers the failure.

media recovery complete

...

ORA-39700: database must be opened with UPGRADE option

Resolution:

The resolution involves manually completing the database upgrade process on the target server. The "failed" status of the restore job simply marks the end of the automated phase and the beginning of the required manual intervention.

  1. Connect to the Database: Log in to the target database server and connect to the newly restored instance as a privileged user (e.g., sqlplus / as sysdba).

  2. Start in Upgrade Mode: The database will likely be in a MOUNT state. Open it in UPGRADE mode using the following command:
    STARTUP UPGRADE;

  3. Run Upgrade Scripts: Execute the database upgrade scripts. For modern versions like 19c, this is typically handled by the dbupgrade command-line utility run from the Oracle Home directory.

  4. Restart the Database: Once the upgrade process completes successfully, shut down the instance and restart it in normal mode.
    SHUTDOWN IMMEDIATE;

    STARTUP;

  5. The database will now be open, fully upgraded to the new version, and ready for use.

Recommendation/Reference:

  • When planning a database migration or disaster recovery test that involves moving to a higher Oracle version, always factor in the post-restore upgrade process.

  • The restore job's "failure" with ORA-39700 should be treated as an expected checkpoint, not an unexpected error. Ensure you have the correct upgrade documentation and any necessary scripts from Oracle Support available before starting the restore.

  • This preparation will help minimize the time required to bring the database online after the files have been restored.

Did this answer your question?