Howto: Apply 12c Grid and DB PSU to Oracle 12c 2 node RAC

Patching can be cumbersome if you do not follow the procedure. One of the most important document is the README that comes with the patch or patchset.

For this write-up, I will be patching grid home version and database version to april 2016 PSU.

Before we download the required patch, we need to verify if we have java user objects in use in the database. This helps us determine if we need the OJVM patch or not. If Multimedia, Spatial, and/or OLAP features/components are installed and used in the database then the OJVM patch will be required.

I did not require an OJVM patch, you can further check MOS: 397701.1 for object count in 12c.

Moving on to the actual patching, this is the link to the PSU I will be using for this activity (Patch 22646084: GRID INFRASTRUCTURE PATCH SET UPDATE (APR2016)). This PSU includes the DB PSU.

Before you proceed any further, look at the README. It gives all the information required. Notice that it requires OPatch version or later. Using a lower version might give unfavorable results or fail the patching.

Download the latest OPatch and select release from the release selection drop down.

During patch installation, OPatch saves copied of all the files that will be replace by the new patch before new/patched versions of these files are loaded in $ORACLE_HOME/.patch_storage. Known as rollback files, these are important in making a patch rollback. Optionally, take a backup of $GRID_HOME/.patch_storage and $DB_HOME/.patch_storage.

Run opatch lsinventory on all the homes that will be patched.

Unzip the PSU Patch 22646084 to a shared location and ensure that the oinstall group has read permissions. If not, run the following command

Create the OCM (Oracle Configuration Manager) response file. Its not required as its set to be deprecated in future releases.

12c OCM Deprecation

12c OCM Deprecation




If any one off patches are already installed, you can check for any conflicts. It will check in GI and DB homes.

The last lines of the log should show something along these lines, unless some patch needs to be rolled back.

Now, run the opatchauto apply command to apply the PSU to grid and oracle database home

All the logs from the opatch or opatchauto can be found in the home from where opatch is executed, like $GI_HOME/cfgtoollogs.

Verify using the opatch lsinventory command from the GI home

And for our database home


Like catbundle in 11g, 12c has datapatch. Refer for MOS 1585822.1

Datapatch determines the requisite apply/rollback actions by matching an internal repository with the patch inventory.
Datapatch should be invoked when the database is restarted after a patching session.
Enterprise Manager and OPatchAuto call datapatch automatically during every patching session.
If OPatch is used to install RDBMS patches then datapatch has to be explictly called to complete any patching actions after database restart.
Datapatch will automatically determine the set of patches that need to be installed and a set of patches that need to be rolled back.
Datapatch ensures that a patch has been installed/rolled back in all RAC instances before to initiate any post-patch SQL actions on the database.
In Oracle Multitenant environment datapatch will patch the root and any pluggable databases that are opened.
In order to patch all pluggable databases, it should be ensured that before to invoke datapatch all pluggable databases are opened.
If an unpatched pluggable database is opened in Oracle Multitenant then calling datapatch will complete the pending patch actions.

To update DBA_REGISTRY_SQLPATCH with the PSU information run the following.


Then run datapatch with the following format -> datapatch -apply 19303936/<UPI> -force -verbose, Where UPI is the Unique Patch ID from above. Logs should be in $ORACLE_BASE/cfgtoollogs/sqlpatch

Then login to the database and verify

Thats All! Follow the same procedure in all the nodes in the cluster.

Watch the whole video of patching 12c GI and DB home in RAC environment.