In this article we will present how to apply and reverse a PSU applied to Database Home on a node with the conflict resolution method. To do this you need to have at least a 2-node RAC Database.

If you want to patch on Grid Infrastructure Home in Oracle 12c then click here

Our test environment:

  • Grid InfrastructureHome is 12.1.0.2.0
  • Oracle Home is 12.1.0.2
  • 2 Node RAC

We need to initially download the desired PSU and My Oracle Support compatible OPatch utility (support.oracle.com).

  • Doc ID 1454618.1 -> Quick References to Patch Numbers for Database / GI PSU, SPU (CPU), Bundle Patches and Patchsets.
  • Doc ID 274526.1 -> How To Download And Install The Latest OPatch (6880880) Version.

Our scenario:

  • P24412235 -> Oct 2016 PSU for DB
  • P6880880 -> latestOPatchUtility

The next step is to install OPatch in Database Home:

  • Find the DB Home;
  • Back up the old OPatch utility;
  • Unzip the new OPatch.

After unpacking the new OPatch utility, check the version.

There are 3 main steps to applying the PSU:

  • Detect and resolve conflicts.
  • Apply Patch to DB Home.
  • Uninstall Patch if necessary.

 

Now you need to unzip the PSU and make sure that the directory where you are unpacking is accessible to DBOwner and there is enough space in / tmp.

Conflict Detection and Resolution

This step must be performed before the PSU is applied in any environment.

The easiest and quickest way to determine if you have a patch already applied that will conflict with another patch that will still be applied is through the One-off Patch ConflictDetectionandResolution method.

If no conflict is found you can apply the patch, otherwise you need to resolve the conflicts.

Execute:

export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH
opatchauto apply /u01/soft/24412235 -analyze -oh /u01/app/oracle/product/12.1.0.2/db_1
Note:The opatchauto utility must be run as root.

Output Example:

Applying the Patch in the Database Home

The OPatch utility automates the patch application for Oracle Grid Infrastructure Home and Oracle RAC Database Home. It operates by consulting the existing configuration and automating the steps required to patch both DB Home and GI Home.

The utility must be run by an Operating System user with root privileges and must still be run on each cluster node for GI Home or RAC DB Home if the latter is not on shared filesystem. The utility should not run in parallel on other nodes in the cluster.

Run:

export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH
opatchauto apply /u01/soft/24412235 -oh /u01/app/oracle/product/12.1.0.2/db_1
Note:The opatchauto utility must be run as root.

Output Example:

After applying the PSU to the DB Home you can consult the list of patchsets applied using OPatch’s “lsinvetory”.

Run:

opatchlsinventory -oh /u01/app/oracle/product/12.1.0.2/db_1

Output example:

Removing the Database Home Patch

At this point we apply the PSU in the Database Home on only one cluster node. After verifying the performance we identified some problems in our environment and decided to reverse the PSU that was applied.

The patch rollback instructions will be different for GI and DB Home. The steps required for rollback in DB Home are listed below.

Run:

export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH
opatchauto rollback /u01/soft/24412235 -oh /u01/app/oracle/product/12.1.0.2/db_1

Note:The opatchauto utility must be run as root.

Output Example:

Thanks for reading and hope you find this article useful. We invite you to continue following up on Oracle RAC publications.

Comments

  1. Pratik

    Hi Skant,

    Thanks for step by step procedure.

    Three queries:
    1. How is opatchauto different than opatch ?
    2. In opatch utility we use -report option. So is -analyze same as that in opatchauto ?
    3. Don’t you need to run $ORACLE_HOME/rdbms/admin/catbundle.sql to update the catalog ?

    Awaiting for your reply.

    1. Skant Gupta Article Author

      1. How is opatchauto different than opatch ?
      latest PSU come with opatchauto, even you can also use opatch for manual patching.
      2. In opatch utility we use -report option. So is -analyze same as that in opatchauto ?
      Yes
      3. Don’t you need to run $ORACLE_HOME/rdbms/admin/catbundle.sql to update the catalog ?
      As you see it’s 12c , so there is no need for catbundle.sql

Leave a Reply

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