Upgrading a Single Regular PDB from 12.1 to 12.2
You can also upgrade a specific PDB without upgrading the whole CDB:
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.
Close the PDB from the 12.1 CDB to unplug it. Then plug it into the target 12.2 CDB.
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
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!