2 Preparing to Upgrade Oracle Database
Before you upgrade Oracle Database, review new features, and carry out procedures to prepare your database for upgrade.
Note:
Oracle strongly recommends that you test the upgrade process and prepare a backup strategy.- Installing Oracle Software in a New Oracle Home
Choose a new location for the target Oracle home, and then install the new Oracle Database release software for single-instance. - About Oracle Database AutoUpgrade
The AutoUpgrade utility is designed to automate the upgrade process, both before starting upgrades, during upgrade deployments, and during postupgrade checks and configuration migration - Prepare a Backup Strategy Before Upgrading Oracle Database
You must design and carry out an appropriate backup strategy to ensure a successful upgrade. - Database Preparation Tasks to Complete Before Starting Oracle Database Upgrades
Ensure that you have completed these database preparation tasks before starting an Oracle Database upgrade. - About the AutoUpgrade Analyze Processing Mode
The AutoUpgrade Analyze (analyze
) processing mode checks your database to see if it is ready for upgrade. - AutoUpgrade with Source and Target Database Homes on Same Server (Typical)
When your Oracle Database Source and Target Oracle homes are installed on the same physical server, use this example. - Preparing for Upgrades of Databases with Oracle Database Vault
If the Oracle Database you plan to upgrade uses Oracle Database Vault, then you must disable Oracle Database Vault before starting the upgrade.
About Oracle Database AutoUpgrade
The AutoUpgrade utility is designed to automate the upgrade process, both before starting upgrades, during upgrade deployments, and during postupgrade checks and configuration migration
When you perform upgrades, Oracle
recommends that you download the most recent version of the
AutoUpgrade Utility from My Oracle Support Document 2485457.1, and
use autoupgrade.jar
to prepare for and to deploy
your upgrade. You use AutoUpgrade after you have downloaded binaries
for the new Oracle Database release, and set up new release Oracle
homes. When you use AutoUpgrade, you can upgrade multiple Oracle
Database deployments at the same time, using a single configuration
file, customized as needed for each database deployment.
The autoupgrade.jar
file exists by default in the Oracle home.
However, before you use AutoUpgrade, Oracle strongly recommends that you download the
latest AutoUpgrade version. AutoUpgrade is included with each release update (RU), but
the most recent AutoUpgrade version is always available from My Oracle Support Document
2485457.1.
Note:
AutoUpgrade is available for Oracle Database Enterprise Edition, and Oracle Database Standard Edition. It is not available for Oracle Database Express Edition.
Preventing Issues: Analyze and Fixup Modes
Before the upgrade, in Analyze mode, the AutoUpgrade utility performs read-only analysis of databases before upgrade, so that it can identify issues that require fixing. You can run the utility during normal database operations. In Fixup Mode, the AutoUpgrade utility detects and identifies both fixes that require manual intervention, and fixes that the AutoUpgrade utility can perform during the upgrade deployment phase.
Simplifying Upgrades: Deploy and Upgrade Modes
In Deploy phase, the AutoUpgrade utility modifies the databases you indicate in your configuration file. It enables you to call your own custom scripts during the upgrade to configure databases. In many cases, the AutoUpgrade utility can perform automatic fixes to databases during the upgrade process without requiring manual intervention.
Deploy and Upgrade Postupgrade Checks and Fixes
After an upgrade completes with either Deploy or Upgrade modes, AutoUpgrade performs
postupgrade checks. It provides a process where you can enable your custom scripts
to be run on each of the upgraded databases, in accordance with the configuration
instructions you provide in the AutoUpgrade configuration file, and also can run
automatic postupgrade fixups as part of the postupgrade process. In Deploy mode,
AutoUpgrade also confirms that the upgrade has succeeded, and copies database files
such as sqlnet.ora
, tnsname.ora
, and
listener.ora
from the source home to the target home. After
these actions are complete, the upgraded Oracle Database release is started in the
new Oracle home.
Related Topics
Parent topic: Preparing to Upgrade Oracle Database
About the AutoUpgrade Analyze Processing Mode
The AutoUpgrade Analyze (analyze
) processing mode checks your database to see if it is ready for upgrade.
When you run AutoUpgrade in Analyze mode, AutoUpgrade only reads data from the database, and does not perform any updates to the database. You can run AutoUpgrade using the Analyze mode during normal business hours. You can run AutoUpgrade in Analyze mode on your source Oracle Database home before you have set up your target release Oracle Database home.
You start AutoUpgrade in Analyze mode using the following syntax, where
Java-8-home
is the location of
your Java 8 distribution, or the environment variable set for the Java 8 home, and
path/yourconfig.txt
is the path and filename
of your configuration file:
Java-8-home/bin/java -jar autoupgrade.jar -config /path/yourconfig.txt -mode analyze
For example, suppose you have copied the most recent AutoUpgrade release to the new
release Oracle home under rdbms/admin, and set an environment variable for that home to
21CHOME
, and copied the configuration file under the Oracle user
home, under the directory /scripts
, and called it
21config.cfg
, you then enter the following command:
java -jar $21CHOME/rdbms/admin/autoupgrade.jar -config /scratch/scripts/21config.cfg -mode analyze -mode analyze
Oracle Database Release 12.2 (12.2.0.1) or newer Oracle homes have a valid java version by default.

Description of the illustration autoupgrade-analyze-flow.eps
The AutoUpgrade Analyze mode produces two output files, which are given the name of the system identifier (SID
) of the database that you check:
-
SID.html
: View this file using a web browser.
-
SID_preupgrade.log
: View this file using a text editor.
Each report identifies upgrade errors that would occur if you do not correct them, either by running an automatic fixup script, or by manual correction. If errors occur, then they are reported in the user log file, and also in the status.json
file.
The Analyze mode also generates a status directory in the path cfgtoollogs/upgrade/auto/status
. This directory contains files that indicate if the analysis was successful or failed. This directory has two JSON files, status.json
and progress.json
:
status.json
: A high-level status JSON file that contains the final status of the upgrade.progress.json
: A JSON file that contains the current progress of all upgrades being performed on behalf of the configuration file. If errors occur, then they are reported in the log file of the user running AutoUpgrade, and also in thestatus.json
file.
If your target database Oracle home is not available on the server, then in your configuration file, you must set the source Oracle home parameters to the same path, so that the AutoUpgrade analyze processing mode can run. For example:
#
# Source Home
#
sales3.source_home=d:\app\oracle\product\12.2.0\dbhome_1
#
# Target Oracle Home
#
sales3.target_home=d:\app\oracle\product\21.0.0\dbhome_1
Earlier releases of AutoUpgrade required you to set
target_home
. In later releases of AutoUpgrade, this restriction has
been lifted for both Analyze and Fixups modes.
Parent topic: Preparing to Upgrade Oracle Database
AutoUpgrade with Source and Target Database Homes on Same Server (Typical)
When your Oracle Database Source and Target Oracle homes are installed on the same physical server, use this example.
Context: Source and Target homes are on the same server.
To start the analysis, enter the following command.
java -jar autoupgrade.jar -config config.txt -mode analyze
The command produces a report that indicates any error conditions that the command finds. Review the error conditions.
To start the deployment of the upgrade, enter the following command:
java -jar autoupgrade.jar -config config.txt -mode deploy
Parent topic: Preparing to Upgrade Oracle Database
Preparing for Upgrades of Databases with Oracle Database Vault
If the Oracle Database you plan to upgrade uses Oracle Database Vault, then you must disable Oracle Database Vault before starting the upgrade.
During the upgrade process, if your source Oracle Database uses Oracle Database Vault, then you must first disable Oracle Database Vault before you start the upgrade. .
You have two options you can use:
- Use a manual procedure: Log on as the common Database Vault (DV)
administrator in the
CDB$ROOT
and grant theDV_PATCH_ADMIN
role toSYS
, or log in and disable Oracle Database Vault on every container. Procedures vary slightly, depending on your upgrade scenario. This procedure is described in My Oracle Support, "Requirement for Upgrading Database with Database Vault (Doc ID 2757126.1)". - Download the latest AutoUpgrade Jar file, and perform the procedure described here.
With either option, when you run AutoUpgrade in Analyze mode, it detects that Oracle Database Vault is enabled, and indicates in its report that you must ensure the prerequisites for Oracle Database Vault and upgrade are met.
Example 2-1 AutoUpgrade Procedure for Databases Using Oracle Database Vault
When you use AutoUpgrade, and your database si configured with Oracle Database Vault, the upgrade procedure is as follows:
- Disable Oracle Database Vault.
- Install the new Oracle Database release.
- Download the latest AutoUpgrade JAR file from My Oracle Support note
2485457.1, and replace the AutoUpgrade JAR file in the new Oracle Database
release, in the path
Oracle_home/rdbms/admin
- Run the AutoUpgrade utility (or Database Upgrade Assistant), and complete the upgrade.
- Enable Oracle Database Vault in the upgraded Oracle Database.