Oracle 19c to Oracle AI Database 26ai Upgrade Using AutoUpgrade – Step‑by‑Step Guide
This guide is suitable for DBAs, architects, and learners planning on‑premises upgrades from 19c to 26ai.
Why Use AutoUpgrade for 19c → 26ai?
AutoUpgrade is Oracle’s official upgrade automation tool that:
- Reduces manual errors
- Performs hundreds of readiness checks
- Supports resume and parallel upgrades
- Is continuously updated via My Oracle Support (MOS)
Important: AutoUpgrade is released as a standalone patch on MOS, not bundled with older Oracle homes.
Prerequisites:
Before starting the upgrade, ensure:
- Source Database: Oracle Database 19c (latest RU recommended)
- Target Home: Oracle AI Database 26ai installed
- OS user has proper permissions
- Adequate space in SYSTEM, SYSAUX, TEMP, and UNDO
- Valid backup of the database
Step 1: Prepare Environment Variables:
Set environment variables for both source and target Oracle homes.
# Source database (19c)
export ORACLE_SID=SRLAB
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
# Target home (26ai)
export ORACLE_HOME_26AI=/u01/app/oracle/product/26.23.1/dbhome_1
Step 2: Download AutoUpgrade from MOS:
- Log in to My Oracle Support
- Navigate to Patches & Updates
- Search for AutoUpgrade
- Download the latest AutoUpgrade patch
Unzip the tool:
unzip autoupgrade_*.zip -d /u01/app/oracle/autoupgrade
Best Practice: Always use the latest AutoUpgrade version to get new checks for Oracle AI Database 26ai.
Step 3: Create AutoUpgrade Configuration File:
AutoUpgrade is driven by a configuration file. Create config.cfg.
global.autoupg_log_dir=/u01/app/oracle/autoupgrade/logs
upg1.dbname=SRLAB
upg1.sid=SRLAB
upg1.start_time=NOW
upg1.source_home=/u01/app/oracle/product/19.3.0./dbhome_1
upg1.target_home=/u01/app/oracle/product/26.23.1/dbhome_1
upg1.log_dir=/u01/app/oracle/autoupgrade/logs/SRLAB
upg1.sid=SRLAB19
upg1.target_cdb=SRLAB26
Step 4: Run AutoUpgrade in Analyze Mode:
Analyze mode performs readiness checks with zero downtime.
java -jar autoupgrade.jar \
-config config.cfg \
-mode analyze
What Analyze Mode Checks
- Invalid objects
- Deprecated and desupported parameters
- Tablespace space requirements
- Timezone (DST) version compatibility
- Component and registry status
Review the generated report carefully before proceeding.
Step 5: Fix Common Pre‑Upgrade Issues:
Fix Invalid Objects
@?/rdbms/admin/utlrp.sql
Check for Remaining Invalid Objects
select count(*) from dba_objects where status='INVALID';
Resolve Tablespace Space Issues
alter database datafile '/path/system01.dbf' resize 10G;
Address Timezone Warnings
Timezone mismatches should be resolved before upgrade to avoid long downtime during post‑upgrade.
Step 6: Start the Upgrade (Deploy Mode):
Once all issues are resolved, start the actual upgrade.
java -jar autoupgrade.jar \
-config config.cfg \
-mode deploy
What AutoUpgrade will do?
- Stop the database
- Upgrade dictionary and components
- Restart the database in the new 26ai home
Step 7: Monitor Upgrade Progress:
Monitor logs in real time:
tail -f autoupgrade_ORCL.log
You can also use the AutoUpgrade console to track progress.
Step 8: Resume After Failure (Key Feature):
If the upgrade fails at any stage, fix the issue and resume:
java -jar autoupgrade.jar -resume
AutoUpgrade resumes from the failure point, avoiding a full restart.
Step 9: Post‑Upgrade Validation:
Verify Database Version
select banner from v$version;
Expected output:
- Oracle Database 26ai Enterprise Edition
- Check Registry Status
select comp_name, status from dba_registry;
All components should be in VALID status.
Step 10: Post‑Upgrade Tasks:
After upgrade, perform the following:
- Recompile any remaining invalid objects
- Gather dictionary statistics
- Validate application connectivity
- Review deprecated feature usage
- Enable and explore Oracle AI Database 26ai features
Key Best Practices:
- Always download latest AutoUpgrade patch from MOS
- Never reuse an old AutoUpgrade JAR
- Run analyze mode multiple times if needed
- Test the upgrade in non‑production first
- Keep logs for audit and rollback reference
Conclusion:
Upgrading from Oracle 19c to Oracle AI Database 26ai using AutoUpgrade is a safe, automated, and Oracle‑recommended approach. With proper preparation and analysis, you can significantly reduce upgrade risk and downtime.
- If you found this guide useful, stay tuned for:
- AutoUpgrade error‑to‑fix guides
- 26ai new feature deep dives
- Real production upgrade checklists
Happy Upgrading 🚀
2 comments
thanks for sharing the details
ReplyNicely explained. If possible share steps for cluster environments
Reply