ORACLE 12c PDB Upgrade
This document explains how to upgrade one particular PDB in CDB environment from 188.8.131.52 to 184.108.40.206
Suppose Oracle 220.127.116.11 software installed and created CDB environment with multiple PDBS. We need to upgrade only one or few PDBS upgrade.
As per upgrade process , install new oracle version and create CDB with empty.
Current Oracle HOME /u01/app/oracle/product/18.104.22.168, here CDB name is OR12CDB and pluggable database names are pdb1 and pdb2.
New Oracle HOME /u01/app/oracle/product/22.214.171.124, here CDB name is O12CR1.
CDB upgradation will not there because CDB will never store user data. While installing new oracle home we can create new CDB .
As per upgrade process, we will unplug the PDB and plug into new CDB and run the script to convert. Here we will upgrade PDB1 database.
Step1 : Stop the application and take Database Backup
Disable monitoring,cronjobs ,database jobs and etc.
Step2: Prepare the PDB for Upgrade
The PDB must be prepared for upgrade, then unplugged from the source container databases.
Switch to the "OR12CDB" instance in the "126.96.36.199" environment.
copy the preupgrade.sql , utluppkg.sql script from latest oracle home to /home/oracle/upgrade folder.
Script will located in /u01/app/oracle/product/188.8.131.52/rdbms/admin
Login to OR12CDB database
Here it shows to collect dictionary stats. Sometimes it may tell to increase tablespace (system,undo,sysaux and temp), parameter value changes and etc. Best practice always says that make 1G free space in system,sysaux ,undo and temp.
Step 3: Unplug the PDB1 from OR12CDB
Connect to the root container and unplug the PDB.
Note: we are upgrading within the server only, no need to copy anything
Step4: Upgrade the PDB
The PDB must be plugged into the destination CDB and upgraded.
Switch to the "O12CR1" instance in the "184.108.40.206" environment.
Plugin the "pdb1" pluggable database into the "O12CR1" container.
Don't worry about the "Warning: PDB altered with errors." message at this point.
Run the "catupgrd.sql" script against the PDB. Notice the use of the "-c" flag to specify an inclusion list. If you were upgrading multiple PDBs, you could list them in a space-separated list so they are all upgraded in a single step.
Start the PDB and recompile any invalid objects.
Run the "postupgrade_fixups.sql" script. Remember to perform any recommended manual steps.
Select banner from v$version;
Select comp_name,status,version from dba_registry;
Check the connectivity.
Once application validation is good start monitoring, change the oracle home path for this pdb jobs script, remove comment from cron jobs etc..
Please update your comments on firstname.lastname@example.org