Since Oracle 21c, the non-CDB architecture has been deprecated. This means that all Oracle databases must now adopt the multitenant architecture (CDB + PDB). Thankfully, Oracle provides a powerful utility to ease this transition: AutoUpgrade.

In this post, I’ll walk you through converting a non-CDB database into a PDB within a target CDB using AutoUpgrade.

🔎 Table of Contents

🔧 Prerequisites

  • Oracle 19c or later
  • An existing non-CDB database
  • A target CDB (e.g., CDB19)
  • Java installed (needed for AutoUpgrade)
  • The autoupgrade.jar file is available

🛠️ Conversion Steps

1. Prepare the Environment

  • Ensure the target CDB is open in READ WRITE mode.
  • Confirm the non-CDB is healthy (no data corruption or critical alerts).

2. Obtain AutoUpgrade

The AutoUpgrade JAR file is located at:

$ORACLE_HOME/rdbms/admin/autoupgrade.jar

Or download the latest version from My Oracle Support:
MOS Note 2485457.1

3. Create the Configuration File

As mentionned in my first blog about AutoUpgrade, there is a powerful site to create the AutoUpgrade configuration file. You can found it at : https://viniciusdba.com.br/autoupgrade-composer/

Example autoupgrade.cfg:

global.autoupg_log_dir=/u01/app/autoupgrade/logs
upg1.dbname=UPGR
upg1.start_time=NOW
upg1.source_home=/u01/app/oracle/product/19
upg1.target_home=/u01/app/oracle/product/19
upg1.sid=UPGR
upg1.target_cdb=CDB19
upg1.log_dir=/u01/app/autoupgrade/logs
upg1.upgrade_method=convert

4. Run the Analysis

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

This generates reports to help identify potential issues.

5. Review the Reports

cd /u01/app/autoupgrade/logs
less upg1/prechecks/*.html

==========================================
          Autoupgrade Summary Report
==========================================
[Date]           Wed Oct 15 12:38:55 GMT 2025
[Number of Jobs] 1
==========================================
[Job ID] 102
==========================================
[DB Name]                upgr
[Version Before Upgrade] 19.27.0.0.0
[Version After Upgrade]  19.27.0.0.0
------------------------------------------
[Stage Name]    PRECHECKS
[Status]        SUCCESS
[Start Time]    2025-10-15 12:38:31
[Duration]      0:00:23
[Log Directory] /u01/app/autoupgrade/logs/UPGR/102/prechecks
[Detail]        /u01/app/autoupgrade/logs/UPGR/102/prechecks/ftex_preupgrade.log
                Check passed and no manual intervention needed
------------------------------------------

6. Deploy the Conversion

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

Stages
	SETUP            <1 min
	PREUPGRADE       <1 min
	PRECHECKS        <1 min
	PREFIXUPS        1 min
	DRAIN            <1 min
	NONCDBTOPDB      3 min
	DBUPGRADE        ~0 min (RUNNING)
	POSTUPGRADE     
	SYSUPDATES      

Stage-Progress Per Container

	+--------+---------+
	|Database|DBUPGRADE|
	+--------+---------+
	|    UPGR|    100% |
	+--------+---------+

The command status is running every 10 seconds. PRESS ENTER TO EXIT
Job 103 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished                  [1]
Jobs failed                    [0]
Jobs restored                  [0]
Jobs pending                   [0]

AutoUpgrade will:

  • Convert the non-CDB into a PDB
  • Plug it into the target CDB
  • Run the required scripts

7. Final Verification

[CDB19:oracle@holserv1:~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Oct 15 12:51:41 2025
Version 19.27.0.0.0

Copyright (c) 1982, 2024, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.27.0.0.0

SQL> show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 UPGR 			  READ WRITE NO
	 4 ORANGE			  READ WRITE NO

💡 Bonus Tip: Rename the PDB

If you’d like to rename the PDB after the conversion:

ALTER PLUGGABLE DATABASE UPGR CLOSE IMMEDIATE;
ALTER PLUGGABLE DATABASE UPGR RENAME TO NEWPDB;

📝 Conclusion

Using AutoUpgrade to convert a non-CDB to a PDB is efficient, supported, and reliable. It reduces manual effort and helps align your databases with Oracle’s long-term multitenant strategy.

If you’re still running non-CDB databases, now is the perfect time to migrate.

📚 References