OPatch supported patch methods in RAC environment

OPatch supported patch methods in RAC environment


Before starting this article let's have an idea about oracle Interim Patch (formerly known as a "one-off" patch). An oracle Interim Patch or "one-off" patch is a bug fix (or set of fixes) made available to customers to solve a particular bug. This is necessary because for business reasons many ones cannot wait till the next Patch Set or new product release to get a fix. Oracle sometimes recommend interim patches specially security patches to be applied to your systems. Note that , interim patches can only be applied to a particular product version (base release or patch set). That is an interim patch created for 10.2.0.2 should NOT be installed on 10.2.0.3 or 10.2.0.4.

The OPatch (also called the Interim Patch Installer) is the oracle supplied utility which is used to apply interim patches to Oracle's database software. OPatch/Interim Patch Installer supports -
- Applying an interim patch
- Rolling back the application of an interim patch
- Conflict resolution when applying an interim patch after previous interim patches have been applied
- Reporting on installed products and Interim (One-Off) patch

You can download OPatch from metalink as patch 6880880. Patches for Oracle 9i Release 2 Patchset 1 (and beyond) do not include OPatch. OPatch is included from Oracle9i Release 2.

OPatch supports 3 different patch methods on a RAC environment.
1)Patching RAC as a single instance (All-Node Patch)
2)Patching RAC using a minimum down-time strategy (Min. Downtime Patch)
3) Patching RAC using a rolling strategy - No down time (Rolling Patch)

1) Patching RAC as a single instance (All-Node Patch) 
In this mode, OPatch applies the patch to the local node first, then propagates the patch to all other nodes, and finally updates the inventory. All instances will be down during the whole patching process.

The flow diagram of All-node patch is,

. Shutdown all Oracle instances on all nodes
. Apply the patch to all nodes
. Bring all nodes up

2) Patching RAC using a minimum down-time strategy (Min. Downtime Patch)
In this mode, OPatch patches the local node, asks users for a sub-set of nodes, which will be the first nodes to be patched. After the initial subset of nodes are patched, Opatch propagates the patch to the other nodes and finally updates the inventory. The downtime would happen between the shutdown of the the second subset of nodes and the startp of the initial subset of nodes patched.

The flow diagram of Minimum downtime is,

. Shutdown the Oracle instance on node 1
. Apply the patch to the Oracle instance on node 1
. Shutdown the Oracle instance on node 2
. Apply the patch to the Oracle instance on node 2
. Shutdown the Oracle instance on node 3
. At this point, instances on nodes 1 and 2 can be brought up
. Apply the patch to the Oracle instance on node 3
. Startup the Oracle instance on node 3

3) Patching RAC using a rolling strategy - No down time (Rolling Patch)
With this method, there is no downtime. Each node would be patched and brought up while all the other nodes are up and running, resulting in no disruption of the system.

The flow diagram of Rolling patch (no downtime) is,

. Shutdown the Oracle instance on node 1
. Apply the patch to the Oracle instance on node 1
. Start the Oracle instance on node 1
. Shutdown the Oracle instance on node 2
. Apply the patch to the Oracle instance on node 2
. Start the Oracle instance on node 2
. Shutdown the Oracle instance on node 3
. Apply the patch to the Oracle instance on node 3
. Start the Oracle instance on node 3

How does OPatch select which method to use?
All oracle one off patches are not rolling patch. Oracle developers determine whether a patch will be rolling patch or not. OPatch also follows an algorithm to determine which methods it will use in RAC environment. The algorithm is,

If (users specify minimize_downtime)
patching mechanism = Min. Downtime
else if (patch is a rolling patch)
patching mechanism = Rolling
else
patching mechanism = All-Node

How to determine if a patch is a "rolling patch" or not?
Based on the oracle database version we can determine whether a patch is a rolling patch or not.

- For oracle version 9i or 10gR1 issue,
$ opatch query -is_rolling

Opatch will ask the patch location and then will inform if the patch is or not a "rolling patch"

- In oracle 10gR2 issue,
$ opatch query -all <patch_location> | grep rolling

For Windows, the following command can be used as grep is not suitable:

> opatch query -all C:\stage\10.2.0.3_Mini_Patches\5731537 | findstr rolling

****************************************************************************************

Comments