Oracle 19c (Non-CDB) to Oracle AI Database 26ai Upgrade Using AutoUpgrade – Step‑by‑Step - Demo!
Oracle recommends AutoUpgrade as the safest and most automated way to upgrade databases. In this blog, we walk through a complete, practical upgrade from Oracle Database 19c to Oracle AI Database 26ai, covering preparation, analysis, upgrade execution, and post‑upgrade validation.
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
- It's continuously updated via My Oracle Support (MOS) and oracle.com site.
Important: AutoUpgrade is released as a standalone patch on MOS, not bundled with older Oracle homes.
To upgrade a 19c non-CDB to an Oracle 26ai CDB with a PDB using the AutoUpgrade tool, you need to perform the operation in a single process as the non-CDB architecture is desupported and must be converted to a PDB during the upgrade.
Below are the High Level Steps:
1. Install the 26ai Software and Create a Empty CDB
2. Download Latest Autoupgrade Tool
3. Ensure Oracle 19c Source DB Backup
4. Check Source and Target DB Compatibility
5. Target CDB Considerations
6, Create the AutoUpgrade Configuration File
7. Autoupgrade Run in Analyze Mode from 19c home
8. Autoupgrade Review and Fix Violations from 19c home
9. Autoupgrade Run in Deploy Mode from 26ai home
10. Monitor the Progress for any Issues/Errors and Finalize
11. Resume After Failure (Key Feature)
12. Post‑Upgrade Validation Checks
Prerequisites:
Step 1: Install the 26ai Software:
Install the Oracle AI Database 26ai Enterprise Edition binaries in a new Oracle Home directory. Do not create a database yet, but you can create the target CDB manually if preferred.
Step 2: Obtain Latest AutoUpgrade:
Ensure you are using the latest autoupgrade.jar file, which is included in the new 26ai Oracle Home's $ORACLE_HOME/rdbms/admin/ directory or can be downloaded from My Oracle Support (MOS Note 2485457.1) and oracle.com.
Step 3: Backup for Rollback Plan:
Perform a full backup of your source 19c non-CDB. During the conversion, the original datafiles are not copied by default, and Flashback Database is not an available rollback mechanism for non-CDB to PDB conversion.
Step 4: Check Compatibility:
Ensure the source database COMPATIBLE parameter is at least 12.2.0.0 and above.
Step 5: Target CDB Considerations:
You must either create a new CDB on the 26ai software or use an existing target release CDB into which the non-CDB will be plugged as a PDB.
Actual Upgrade Steps Starts here...
Step 6: Create the AutoUpgrade Configuration File:
Create a configuration file (e.g., upgrade_ncdb.cfg) that specifies the source and target environments and the conversion details. The target_cdb parameter tells AutoUpgrade which CDB the non-CDB will be plugged into. A sample configuration file (upgrade_ncdb.cfg) might look like this:
[root@aidbahub Softwares]# mkdir -p /u01/app/oracle/autoupgrade/logs
[root@aidbahub Softwares]# chown -R oracle:oinstall /u01/app/oracle/autoupgrade/logs
[root@aidbahub Softwares]# chown -R oracle:oinstall /u01/app/oracle/autoupgrade
[root@aidbahub Softwares]# chmod -R 775 /u01/app/oracle/autoupgrade/logs
[root@aidbahub Softwares]# chmod -R 775 /u01/app/oracle/autoupgrade
[oracle@aidbahub admin]$ ls -lrt autoupgrade*
-rw-r-----. 1 oracle oinstall 6729196 Jan 17 12:47 autoupgrade.jar
[oracle@aidbahub admin]$ mv autoupgrade.jar autoupgrade_bak.jar
[oracle@aidbahub admin]$ ls -lrt autoupgrade*
-rw-r-----. 1 oracle oinstall 6729196 Jan 17 12:47 autoupgrade_bak.jar
[oracle@aidbahub admin]$ cp /u01/app/oracle/autoupgrade/autoupgrade.jar /u01/app/oracle/product/23.26.1.0/db_1/rdbms/admin
[oracle@aidbahub admin]$ ls -lrt autoupgrade*
-rw-r-----. 1 oracle oinstall 6729196 Jan 17 12:47 autoupgrade_bak.jar
-rwxr-xr-x. 1 oracle oinstall 6960211 Feb 22 03:45 autoupgrade.jar
Creating Config File:
vi upgrade_ncdb.cfg
global.autoupg_log_dir=/u01/app/oracle/autoupgrade/logs
upg1.sid=srlab19
upg1.source_home=/u03/app/oracle/product/19.0.0/db_1
upg1.target_home=/u01/app/oracle/product/23.26.1.0/db_1
upg1.log_dir=/u01/app/oracle/autoupgrade/logs
upg1.target_cdb=aidbahub
upg1.target_pdb_name=srlab19plug
upg1.target_pdb_copy_option=file_name_convert=('/u04/oradata/SRLAB19','/u02/oradata/AIDBAHUB/srlab19plug')
upg1.upgrade_node=aidbahub
upg1.target_version=23.6.0
upg1.run_utlrp=yes
upg1.timezone_upg=yes
The target_pdb_copy_option is highly recommended as it preserves your original database files for rollback purposes.
Step 7: Run in Analyze Mode:
Execute AutoUpgrade in analyze mode to check for potential issues and generate reports. Review these reports thoroughly to perform any necessary manual fixups before the actual deployment.
java -jar autoupgrade.jar -config upgrade_ncdb.cfg -mode analyze
[oracle@aidbahub admin]$ $ORACLE_HOME/jdk/bin/java -jar /u01/app/oracle/product/23.26.1.0/db_1/rdbms/admin/autoupgrade.jar -config /u01/app/oracle/autoupgrade/upgrade_ncdb.cfg -mode analyze
Step 8: Review and Fix Violations:
Check the generated HTML and log reports in the global.autoupg_log_dir for any pre-upgrade violations. Run AutoUpgrade in fixups mode to automatically resolve correctable issues.
java -jar autoupgrade.jar -config upgrade_ncdb.cfg -mode fixups
[oracle@aidbahub admin]$ $ORACLE_HOME/jdk/bin/java -jar /u01/app/oracle/product/23.26.1.0/db_1/rdbms/admin/autoupgrade.jar -config /u01/app/oracle/autoupgrade/upgrade_ncdb.cfg -mode fixups
Step 9: Run in Deploy Mode:
Once the analysis is clear and all fixups are applied, run AutoUpgrade in deploy mode. This will shut down the source non-CDB, perform the upgrade to 26ai, and convert it into a PDB within the specified target CDB.
java -jar autoupgrade.jar -config upgrade_ncdb.cfg -mode deploy
[oracle@aidbahub admin]$ $ORACLE_HOME/jdk/bin/java -jar /u01/app/oracle/product/23.26.1.0/db_1/rdbms/admin/autoupgrade.jar -config /u01/app/oracle/autoupgrade/upgrade_ncdb.cfg -mode deploy
What AutoUpgrade will do?
- Stop the database
- Upgrade dictionary and components
- Restart the database in the new 26ai home
Step 10: Monitor Progress and Finalize:
You can monitor the progress through the generated log files or by running AutoUpgrade in -view mode. After a successful upgrade, perform necessary post-upgrade tasks, such as running datapatch on the new PDB and backing up the entire CDB.
Monitor logs in real time:
tail -f autoupgrade_srlab19.log
You can also use the AutoUpgrade console to track progress.
Step 11: Resume After Failure (Key Feature):
If the upgrade fails at any stage, fix the issue and resume:
java -jar autoupgrade.jar -resume
Step 12: Post‑Upgrade Validation:
show pdbs
Verify Database Version
select banner from v$version;
alter session set container=SRLAB19PLUG;
select comp_id,comp_name,version,status from dba_registry;
Hope this helps!
Cheers!
Ramesh Kumar Krishnamoorthy
Follow Me:
LinkedIn: https://www.linkedin.com/in/ramesh-kumar-krishnamoorthy-3a67ba69
Blog: https://www.aidbahub.com
X: https://x.com/aidbahub
Facebook: https://www.facebook.com/oraclef1
Instagram: https://www.instagram.com/oraclef1_1
YouTube: https://www.youtube.com/@aidbahub
WhatsApp Channel: https://www.whatsapp.com/channel/0029Va4vjW5Fi8xcijGe6X3a
Post a Comment: