← Patching & Upgrade
Oracle · Patching & Upgrade

How to upgrade a database with AutoUpgrade in Oracle

Upgrade a database to a new major release with AutoUpgrade: run analyze first, then deploy, driven by a config file.

Tested on19c21c23ai26ai

Upgrade a database to a new major release with AutoUpgrade: analyze first, fix the findings, then deploy. Use autoupgrade.jar from the target Oracle Home (or the latest build from My Oracle Support).

Deploy performs the actual upgrade and is not easily reversible without a restore or Flashback. Always run analyze mode first, resolve its findings, and take a backup before deploy.

# 1. Create a config file db.cfg, for example:
#    global.autoupg_log_dir=/u01/autoupgrade/log
#    upg1.source_home=/u01/app/oracle/product/19.0.0/dbhome_1
#    upg1.target_home=/u01/app/oracle/product/23.0.0/dbhome_1
#    upg1.sid=ORCL

# 2. Analyze (read-only checks, no changes to the database)
$ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar \
  -config db.cfg -mode analyze

# 3. Deploy (performs the upgrade)
$ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar \
  -config db.cfg -mode deploy
UpgradeAutoUpgradeautoupgrade.jar