In this article, I’ll walk through upgrading a single 19c PDB by relocating it from Server A to Server B and upgrading it to 26ai using Replay Upgrade.
Note: this approach is handy when the target database version or operating system differs from the source, or when a full CDB upgrade is not desirable.
If you want to use AutoUpgrade instead, which makes life much easier, check this article: https://www.dbarj.com.br/en/2026/01/upgrade-from-oracle-19c-to-26ai-between-two-different-servers-using-pdb-unplug-plug-with-autoupgrade/
Scope and assumptions
-
The source is Oracle Database 19c RU 29 (the same approach applies to 21c, although it is already out of support).
-
The target database is Oracle AI Database 26ai (23.26.0).
-
Only a single PDB is moved and upgraded; the source CDB remains untouched.
-
Source and target systems have the same endianness, although they may run different OS releases.
Environment overview
Source:
- Oracle Linux 7.9
- Oracle Database 19c (RU 19.29.0)
Target:
- Oracle Linux 8.7
- Oracle AI Database 26ai (RU 23.26.0)
With these prerequisites in place, we can use PDB relocation combined with AutoUpgrade to perform the move and upgrade in a controlled and supported way.
Getting Started
Before moving the PDB, still in 19c, we need to do some prechecks and fixups to ensure nothing is going to fail. Please note you can’t perform those checks after you plug into the new 26ai database, as the dictionary becomes invalid until you finish the upgrade process.
So, connected to my server A, first I create the AutoUpgrade config file:
global.global_log_dir=/home/oracle/autopatch/logs upg1.sid=orcl upg1.source_home=/u01/app/oracle/product/19c/dbhome_1 upg1.target_home=/u01/app/oracle/product/26ai/dbhome_1 upg1.pdbs=PDB01 upg1.restoration=NO upg1.target_version=23
Next, I will run the AutoUpgrade pre-checks:
$ $ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar -config upgrade_pdb.cfg -mode analyze AutoUpgrade 25.6.251016 launched with default internal options Processing config file ... +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 CDB(s) plus 2 PDB(s) will be analyzed Type 'help' to list console commands upg> Job 100 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished [1] Jobs failed [0] Please check the summary report at: /home/oracle/autopatch/logs/cfgtoollogs/upgrade/auto/status/status.html /home/oracle/autopatch/logs/cfgtoollogs/upgrade/auto/status/status.log
Checking the logs, we are good to fly:
$ cat /home/oracle/autopatch/logs/cfgtoollogs/upgrade/auto/status/status.log
==========================================
Autoupgrade Summary Report
==========================================
[Date] Wed Jan 14 16:10:32 GMT 2026
[Number of Jobs] 1
==========================================
[Job ID] 100
==========================================
[DB Name] orcl
[Version Before Upgrade] 19.29.0.0.0
[Version After Upgrade] 19.29.0.0.0
------------------------------------------
[Stage Name] PRECHECKS
[Status] SUCCESS
[Start Time] 2026-01-14 16:09:48
[Duration] 0:00:43
[Log Directory] /home/oracle/autopatch/logs/orcl/100/prechecks
[Detail] /home/oracle/autopatch/logs/orcl/100/prechecks/orcl_preupgrade.log
Check passed and no manual intervention needed
------------------------------------------
Now let’s run the fixups:
$ $ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar -config upgrade_pdb.cfg -mode fixups AutoUpgrade 25.6.251016 launched with default internal options Processing config file ... +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 CDB(s) plus 2 PDB(s) will be processed Type 'help' to list console commands upg> Job 101 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished [1] Jobs failed [0] Please check the summary report at: /home/oracle/autopatch/logs/cfgtoollogs/upgrade/auto/status/status.html /home/oracle/autopatch/logs/cfgtoollogs/upgrade/auto/status/status.log
Checking the logs:
$ cat /home/oracle/autopatch/logs/cfgtoollogs/upgrade/auto/status/status.log
==========================================
Autoupgrade Summary Report
==========================================
[Date] Wed Jan 14 16:18:57 GMT 2026
[Number of Jobs] 1
==========================================
[Job ID] 101
==========================================
[DB Name] orcl
[Version Before Upgrade] 19.29.0.0.0
[Version After Upgrade] 19.29.0.0.0
------------------------------------------
[Stage Name] PRECHECKS
[Status] SUCCESS
[Start Time] 2026-01-14 16:12:11
[Duration] 0:00:36
[Log Directory] /home/oracle/autopatch/logs/orcl/101/prechecks
[Detail] /home/oracle/autopatch/logs/orcl/101/prechecks/orcl_preupgrade.log
Check passed and no manual intervention needed
------------------------------------------
[Stage Name] PREFIXUPS
[Status] SUCCESS
[Start Time] 2026-01-14 16:12:47
[Duration] 0:06:10
[Log Directory] /home/oracle/autopatch/logs/orcl/101/prefixups
[Detail] /home/oracle/autopatch/logs/orcl/101/prefixups/prefixups.html
------------------------------------------
Check prefixups.html if you want to get all the actions performed on your PDB to prepare it, like purge recyclebin, collecting dictionary statistics, etc.
Now we are good to fly. Since we are in 2 different servers, I will unplug the PDB from the first server.
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.29.0.0.0 SQL> alter pluggable database PDB01 close immediate; Pluggable database altered. SQL> alter pluggable database PDB01 unplug into '/u01/app/oradata/PDB01.xml'; Pluggable database altered.
Now it is time to move the PDB data files and XML to the new server:
$ rsync -avz /u01/app/oradata/ORCL/PDB01/ oracle@server-26ai:/u01/app/oradata/ORCL/PDB01/ sending incremental file list ./ sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf sent 377,057,144 bytes received 114 bytes 9,545,753.37 bytes/sec total size is 1,458,610,176 speedup is 3.87 $ rsync -avz /u01/app/oradata/PDB01.xml oracle@server-26ai:/u01/app/oradata/PDB01.xml sending incremental file list PDB01.xml sent 1,751 bytes received 107 bytes 1,238.67 bytes/sec total size is 7,628 speedup is 4.11
Now moving to the new 26ai server, it is time to plug our new database and trigger the Replay Upgrade by simply opening the PDB:
Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.0.0.0 - for Oracle Cloud and Engineered Systems
Version 23.26.0.0.0
SQL> create pluggable database PDB01 using '/u01/app/oradata/PDB01.xml' nocopy tempfile reuse;
Pluggable database created.
SQL> alter pluggable database PDB01 open;
Warning: PDB altered with errors.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 READ WRITE YES
Note: Replay Upgrade has some known issues, especially if your target database was already patched and has moved to a higher RU since it was created. Check this article for more details: https://www.dbarj.com.br/en/2026/01/ora-65047-object-is-invalid-or-was-compiled-with-errors-in-the-root/. If you face any issues, I would recommend using the AutoUpgrade method instead.
Our PDB was successfully upgraded. Now all we have to do is call datapatch to finish the upgrade operation:
$ $ORACLE_HOME/OPatch/datapatch
SQL Patching tool version 23.26.0.0.0 Lim on Wed Jan 14 16:58:33 2026
Copyright (c) 2012, 2025, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/product/26ai/dbhome_1/cfgtoollogs/sqlpatch/sqlpatch_sid_orcl_ts_2026_01_14_16_58_33_pid_994785/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Note: Datapatch will only apply or rollback SQL fixes for PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
No interim patches found
Current state of release update SQL patches:
Binary registry:
23.26.0.0.0 Release_Update 250927052030: Installed
PDB CDB$ROOT:
Applied 23.26.0.0.0 Release_Update 250927052030 successfully on 14-JAN-26 02.13.41.925667 PM
PDB PDB$SEED:
Applied 23.26.0.0.0 Release_Update 250927052030 successfully on 14-JAN-26 02.13.42.033770 PM
PDB PDB01:
Applied 23.26.0.0.0 Release_Update 250927052030 successfully
Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: CDB$ROOT PDB$SEED
No interim patches need to be rolled back
No release update patches need to be installed
No interim patches need to be applied
For the following PDBs: PDB01
No interim patches need to be rolled back
No release update patches need to be installed
No interim patches need to be applied
Bypass install queue:
For the following PDBs: PDB01
No interim rollbacks will bypass install
Patch 38404116 (Database Release Update : 23.26.0.0.0 (38404116) Gold Image): will bypass install
Apply from 23.26.0.0.0 Release_Update 250927052030 to 23.26.0.0.0 Release_Update 250927052030
No interim applys will bypass install
Installation queue after removing bypass entries...
Installation queue:
For the following PDBs: CDB$ROOT PDB$SEED
No interim patches need to be rolled back
No release update patches need to be installed
No interim patches need to be applied
For the following PDBs: PDB01
No interim patches need to be rolled back
No release update patches need to be installed
No interim patches need to be applied
Processing bypass install queue:
Patch 38404116 apply (pdb PDB01): SUCCESS (bypass_install)
SQL Patching tool complete on Wed Jan 14 16:58:44 2026
Finally, the last step is to bounce the database:
Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.0.0.0 - for Oracle Cloud and Engineered Systems
Version 23.26.0.0.0
SQL> alter pluggable database PDB01 close;
Pluggable database altered.
SQL> alter pluggable database PDB01 open;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 READ WRITE NO
SQL>
And call the post-steps:
$ $ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar -preupgrade "dir=/home/oracle/autopatch/logs,inclusion_list=PDB01" -mode postfixups PREUPGRADE logs output location: /home/oracle/autopatch/logs AutoUpgrade 25.6.251016 launched with default internal options Processing config file ... +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 PDB(s) will be processed Job 103 database orcl Job 103 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished [1] Jobs failed [0] Please check the summary report at: /home/oracle/autopatch/logs/cfgtoollogs/upgrade/auto/status/status.html /home/oracle/autopatch/logs/cfgtoollogs/upgrade/auto/status/status.log
That’s it! PDB successfully updated to 26ai.
Have you enjoyed? Please leave a comment or give a 👍!




