Home / Databases / Oracle

DatabasesRunbookAdvanced

Transformation: upgrading Oracle 19c to 23ai with AutoUpgrade

Use AutoUpgrade to analyse, fix up and upgrade 19c databases to 23ai, including converting non-CDBs into PDBs. Covers the config file, the analyze, fixups and deploy modes, restore points for fallback, and the checks to run after the upgrade.

Deepak Bhardwaj3 min read

Applies toOracle Database 19c (source) to Oracle AI Database 23ai (target) on Linux; check the current AutoUpgrade version and supported paths in Oracle's documentation

Why AutoUpgrade

It is Oracle's recommended upgrade tool: it runs pre-checks, applies fixups, upgrades, and can also convert a non-CDB to a PDB in the same run. It works for one database or many in parallel. Always download the latest autoupgrade.jar from My Oracle Support. The version shipped in the Oracle home is often older.

1. Prepare

  • Install the 23ai Oracle home (with the latest Release Update) on the server.
  • If the source is a non-CDB, create the target CDB in the 23ai home (23ai has no non-CDB architecture).
  • Check the source is on a recent 19c RU, and gather dictionary statistics.
  • Full backup, tested.

2. Config file

# sales.cfg
global.autoupg_log_dir=/u01/autoupgrade/logs

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=SALES
upg1.target_cdb=CDB23           # only for non-CDB → PDB conversion
upg1.target_pdb_name=SALESPDB   # name of the new PDB
upg1.restoration=yes            # create a guaranteed restore point for fallback
upg1.timezone_upg=yes

For an existing 19c CDB, omit target_cdb; the whole CDB and its PDBs are upgraded.

3. Analyze

java -jar autoupgrade.jar -config sales.cfg -mode analyze

Read the HTML/text report under the log dir (.../SALES/<job>/prechecks/). It lists:

  • Errors that block the upgrade (fix first).
  • Items that fixups will handle automatically.
  • Manual recommendations (deprecated parameters, invalid objects, desupported features).

4. Fixups (before the window)

java -jar autoupgrade.jar -config sales.cfg -mode fixups

Runs the automatic fixes on the source while it's still on 19c.

5. Deploy (in the window)

java -jar autoupgrade.jar -config sales.cfg -mode deploy

AutoUpgrade has an interactive console:

upg> lsj              # list jobs and status
upg> status -job 101  # detail
upg> tasks

Steps it performs: pre-checks again, creates the guaranteed restore point, upgrades, (plugs in as PDB and converts if configured), runs post-upgrade fixups, and recompiles.

6. Fallback

While the restore point exists and COMPATIBLE hasn't been raised, you can go back:

java -jar autoupgrade.jar -config sales.cfg -restore -jobs 101

For non-CDB-to-PDB conversions the fallback rules are different (the plug-in changes files). Check the documentation for your scenario and keep the backup.

7. After the upgrade

  • Run application tests; compare top SQL performance with the 19c baseline (SQL Plan Management baselines exported before the upgrade help here).
  • Check dba_registry components are VALID and there are no new invalid objects.
  • Update backups, monitoring and connection strings (PDB service if converted).
  • Drop the guaranteed restore point once you're sure. It holds flashback logs and fills the FRA.
  • Raise COMPATIBLE only after the fallback window. It's irreversible.
SELECT name, guarantee_flashback_database, storage_size FROM v$restore_point;
DROP RESTORE POINT AUTOUPGRADE_9212_SALES1900000;     -- name from the listing

Caution

Raising COMPATIBLE removes the restore-point fallback for good. Agree the date with application owners and do it as a separate change.

Checklist

  • Latest autoupgrade.jar; 23ai home patched
  • Target CDB created (for non-CDB sources)
  • Analyze report clean; fixups run
  • Deploy rehearsed on a copy, with timings
  • Restore point fallback tested
  • Post-upgrade checks; COMPATIBLE raised later