Oracle 12cR2: Upgrading a CDB Including PDBs from 12.1 to 12.2

ByJoel Pérez ( Oracle ACE Director )

Oracle 12cR2: Upgrading a CDB Including PDBs from 12.1 to 12.2

Hi Readers


When we talk about Multitenant arquitecture, Upgrade is one of the many advantages using it. Let’s see how we can upgrade a CDB Including PDBs from 12.1 to 12.2. Let’s see how to do it..



To upgrade the CDB and PDBs from Oracle Database 12.1 to Oracle Database 12.2, use the DBUA utility or proceed with manual steps as described in the Figure 1.

In step 2, when running preupgrade.jar in a CDB, make sure that all the PDBs are opened. The fixup scripts and log files are generated in the pre-upgrade directory of the source database, in $ORACLE_BASE/cfgtoollogs/SID/preupgrade.

You can define a list of PDBs to upgrade either by using an inclusion list with the -c parameter or an exclusion list with the -C parameter. The output of the progressing operation is displayed by default on TERMINAL. The output can be a FILE or a directory (DIR). Finally the type of the output is either TEXT by default or XML.

In step 4, use the script to execute the pre-upgrade SQL scripts in the CDB root and in specified PDBs in the correct order. It generates log files that you can view to confirm that the SQL script or SQL statement did not generate unexpected errors. It also starts multiple processes and assigns new scripts to them as they finish running scripts previously assigned to them.

In step 5, remove desupported initialization parameters, adjust deprecated initialization parameters, and add new ones. Make sure that all path names in the parameter file are fully specified.



In step 7, DBUA or automatically runs the Parallel Upgrade Utility.

To upgrade a subset of PDBs within a CDB, you can specify either an inclusion list with the – c parameter or an exclusion list with the -C parameter. Use the -l parameter to specify the directory to use for the spool log files.

In step 9, use the script to execute the postupgrade_fixups.sql and utlrp.sql scripts.

Note: A prioritized list is used in any upgrade from,,, or to 12.2. Default priorities are set to containers, with the CDB root being always upgraded first. The DBA can alter the priority so that PDBs are upgraded according to the configured priority order.


For more information about this topic you could go here:

How to upgrade a PDB on MS Windows from Oracle Database to by unplug / plug in

We hope the content could useful for your Oracle DBA Tasks!

This article is brought by Yunhe Enmo (Beijing) Technology Co.,LTD

Follow our Company in Linkedin:

Subscribe to our Blog and enjoy our Weekly Cloud article..!

About the author

Joel Pérez ( Oracle ACE Director ) administrator