Oracle 12cR2: Upgrading a Single Regular PDB from 12.1 to 12.2

ByJoel Pérez ( Oracle ACE Director )

Oracle 12cR2: Upgrading a Single Regular PDB from 12.1 to 12.2

Upgrading a Single Regular PDB from 12.1 to 12.2

Hi Readers 

You can also upgrade a specific PDB without upgrading the whole CDB:

  1. Prepare the PDB to be unplugged and upgraded in another CDB by executing the same jar file as in the previous slide but only on the PDB. The fixup scripts and log files are generated in the pre-upgrade directory of the source database, in the $ORACLE_BASE/cfgtoollogs/SID/preupgrade directory. Execute the preupgrade_fixups_<PDB>.sql script in the PDB.

  2. Close the PDB from the 12.1 CDB to unplug it. Then plug it into the target 12.2 CDB.

  3. Open the PDB in the target 12.2 CDB in upgrade mode and upgrade it to 12.2.

         $ cd $ORACLE_HOME/rdbms/admin
    
         $ ./catctl.pl -c 'PDB1' -l /tmp/upgrade catupgrd.sql
    
  4. Finally close and open the PDB in normal mode. Use the catcon.pl script to execute the postupgrade_fixups.sql and utlrp.sql scripts. You can verify that all issues have been fixed by running the utlu122s.sql script.

In case the PDB is migrated to an application root, shared objects can be marked as metadata-linked or data-linked by using the DBMS_PDB.SET_METADATA_LINKED or DBMS_PDB.SET_DATA_LINKED or DBMS_PDB.SET_EXT_DATA_LINKED procedures. The user responsible for the migration can be granted EXECUTE on the new DBMS_PDB_ALTER_SHARING package rather than on the DBMS_PDB package to avoid enabling the user to execute other DBMS_PDB procedures.

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

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

Follow our Company in Linkedin: https://www.linkedin.com/company/1856106/

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

About the author

Joel Pérez ( Oracle ACE Director ) administrator