How to Apply Release Update 12.2.0.1.210420 (Patch 32507738 – April 2021 RU)

Oracle recently released its April 2021 Release Update for 12cR2 (Patch 32507738). This post is to cover patching of Oracle 12cR2 database with this latest RU. (For 19.11 RU please read How to Apply Release Update 19.11.0.0.0 (Patch 32545013)). 

Step-1: Install Latest OPatch

First Step of Any Patching Process is to download and install the latest version of OPatch. You can follow How to Upgrade OPatch to Latest Version post to quickly upgrade OPatch to latest version.

Step 2: Download Patch 32545013 from Metalink.

From Metalink (https://support.oracle.com/) Download “Patch 32507738: DATABASE APR 2021 RELEASE UPDATE 12.2.0.1.210420” relevant to your platform. 
oracle> opatch version
OPatch Version: 12.2.0.1.24

OPatch succeeded.
oracle>

Step 3: Check for Patch Conflict

The move the zip file downloaded in Step 2 above to a directory where Oracle has relevant read/write permission and then unzip the file which would create a folder named 32507738. Navigate to this directory and call OPatch in prereq mode:

oracle> opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.24
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /apps/oracle/server/12.2.0.1/dbhome_1
Central Inventory : /apps/oracle/server/12.2.0.1/oraInventory
   from           : /apps/oracle/server/12.2.0.1/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.24
OUI version       : 12.2.0.1.4
Log file location : /apps/oracle/server/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-04-24_19-16-02PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
oracle>

If the pre-requisite check is passed you can proceed further with applying the patch but in case it fails please take necessary actions until the pre-requisite check is passed.

Step-4: Shutdown Database

To minimize the downtime you can shutdown the database after invoking opatch apply but just to explicitly specify, I have created an additional step for this.

Once the database running from the Oracle Home that we are going to patch is shutdown, proceed further with next step.

Step-5: Apply OPatch

Navigate to the folder 32507738 and invoke the OPatch with apply mode.

oracle> $ORACLE_HOME/OPatch/opatch apply
oracle> opatch apply
Oracle Interim Patch Installer version 12.2.0.1.24
Copyright (c) 2021, Oracle Corporation.  All rights reserved.


Oracle Home       : /apps/oracle/server/12.2.0.1/dbhome_1
Central Inventory : /apps/oracle/server/12.2.0.1/oraInventory
   from           : /apps/oracle/server/12.2.0.1/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.24
OUI version       : 12.2.0.1.4
Log file location : /apps/oracle/server/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-04-24_19-19-22PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   32507738

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/apps/oracle/server/12.2.0.1/dbhome_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '32507738' to OH '/apps/oracle/server/12.2.0.1/dbhome_1'
ApplySession: Optional component(s) [ oracle.swd, 12.2.0.1.0 ] , [ oracle.swd.opatchautodb, 12.2.0.1.0 ] , [ oracle.swd.oui, 12.2.0.1.0 ] , [ oracle.ons.cclient, 12.2.0.1.0 ] , [ oracle.ons.eons.bwcompat, 12.2.0.1.0 ] , [ oracle.network.cman, 12.2.0.1.0 ] , [ oracle.oid.client, 12.2.0.1.0 ] , [ oracle.rdbms.drdaas, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.rdbms.util, 12.2.0.1.0...

Patching component oracle.rdbms, 12.2.0.1.0...

Patching component oracle.network.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.rsf, 12.2.0.1.0...

Patching component oracle.ctx, 12.2.0.1.0...

Patching component oracle.ctx.rsf, 12.2.0.1.0...

Patching component oracle.dbdev, 12.2.0.1.0...

Patching component oracle.dbtoolslistener, 12.2.0.1.0...

Patching component oracle.duma, 12.2.0.1.0...

Patching component oracle.has.common.cvu, 12.2.0.1.0...

Patching component oracle.ldap.owm, 12.2.0.1.0...

Patching component oracle.ldap.rsf, 12.2.0.1.0...

Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...

Patching component oracle.oracore.rsf, 12.2.0.1.0...

Patching component oracle.oraolap, 12.2.0.1.0...

Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...

Patching component oracle.rdbms.deconfig, 12.2.0.1.0...

Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...

Patching component oracle.sdo, 12.2.0.1.0...

Patching component oracle.sdo.locator, 12.2.0.1.0...

Patching component oracle.sdo.locator.jrf, 12.2.0.1.0...

Patching component oracle.tfa, 12.2.0.1.0...

Patching component oracle.rdbms.dv, 12.2.0.1.0...

Patching component oracle.assistants.acf, 12.2.0.1.0...

Patching component oracle.xdk.parser.java, 12.2.0.1.0...

Patching component oracle.assistants.deconfig, 12.2.0.1.0...

Patching component oracle.xdk.rsf, 12.2.0.1.0...

Patching component oracle.ons, 12.2.0.1.0...

Patching component oracle.ons.ic, 12.2.0.1.0...

Patching component oracle.rdbms.lbac, 12.2.0.1.0...

Patching component oracle.xdk, 12.2.0.1.0...

Patching component oracle.precomp.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.crs, 12.2.0.1.0...

Patching component oracle.install.deinstalltool, 12.2.0.1.0...

Patching component oracle.sqlplus.ic, 12.2.0.1.0...

Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...

Patching component oracle.rdbms.oci, 12.2.0.1.0...

Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...

Patching component oracle.ldap.client, 12.2.0.1.0...

Patching component oracle.sqlplus, 12.2.0.1.0...

Patching component oracle.assistants.server, 12.2.0.1.0...

Patching component oracle.rdbms.rman, 12.2.0.1.0...

Patching component oracle.precomp.lang, 12.2.0.1.0...

Patching component oracle.precomp.common, 12.2.0.1.0...

Patching component oracle.jdk, 1.8.0.91.0...
Patch 32507738 successfully applied.
Log file location: /apps/oracle/server/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-04-24_19-19-22PM_1.log

OPatch succeeded.
oracle>

Step-6: Start the Database

Start the database that you stopped during Step-5. Once the Database is started along with all the PDBs, proceed further with the next step of applying datapatch.

Step-7: Apply Datapatch (SQL Patching Tool)

oracle> $ORACLE_HOME/OPatch/datapatch -verbose
SQL Patching tool version 12.2.0.1.0 Production on Sat Apr 24 19:36:35 2021
Copyright (c) 2012, 2021, Oracle.  All rights reserved.

Log file for this invocation: /apps/oracle/server/12.2.0.1/cfgtoollogs/sqlpatch/sqlpatch_47601_2021_04_24_19_36_35/sqlpatch_invocation.log

Connecting to database...OK
Note:  Datapatch will only apply or rollback SQL fixes for PDBs
       that are in an open state, no patches will be applied to closed PDBs.
       Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
       (Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Bundle series DBRU:
  ID 210420 in the binary registry and not installed in any PDB

Adding patches to installation queue and performing prereq checks...
Installation queue:
  For the following PDBs: CDB$ROOT PDB$SEED PDB112
    Nothing to roll back
    The following patches will be applied:
      32507738 (DATABASE APR 2021 RELEASE UPDATE 12.2.0.1.210420)

Installing patches...
Patch installation complete.  Total patches installed: 3

Validating logfiles...
Patch 32507738 apply (pdb CDB$ROOT): SUCCESS
  logfile: /apps/oracle/server/12.2.0.1/cfgtoollogs/sqlpatch/32507738/24169280/32507738_apply_CDB12_CDBROOT_2021Apr24_19_37_07.log (no errors)
Patch 32507738 apply (pdb PDB$SEED): SUCCESS
  logfile: /apps/oracle/server/12.2.0.1/cfgtoollogs/sqlpatch/32507738/24169280/32507738_apply_CDB12_PDBSEED_2021Apr24_19_41_13.log (no errors)
Patch 32507738 apply (pdb PDB112): SUCCESS
  logfile: /apps/oracle/server/12.2.0.1/cfgtoollogs/sqlpatch/32507738/24169280/32507738_apply_CDB12_PDB112_2021Apr24_19_41_13.log (no errors)
SQL Patching tool complete on Sat Apr 24 19:46:11 2021
oracle>

That’s it the database has been patched.

Check for any invalid objects post this patching exercise and if needed repair the invalid objects using utlrp.sql

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.