Disclaimer

Saturday 17 July 2021

RAC Patching Method

 


There are total three methods by which we can apply patch to RAC Cluster Environment on Unix System:
  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)

  • Patching RAC as a single instance (All-Node Patch)
In this mode, all instances must be down during the whole patching process. OPatch applies the patch to the local node first, then propagates the patch to all the other nodes, and finally updates the inventory.
  • Shutdown all Oracle instances on all nodes
  • Apply the patch to the RAC home on all nodes
  • Bring all instances up

  • 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 subset of 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 second subset of nodes and the startup of the initial subset of nodes patched.
  • Shutdown all the Oracle instances on node 1
  • Apply the patch to the RAC home on node 1
  • Shutdown all the Oracle instances on node 2
  • Apply the patch to the RAC home on node 2
  • Shutdown all the Oracle instances on node 3
  • At this point, instances on nodes 1 and 2 can be brought up
  • Apply the patch to the RAC home on node 3
  • Startup all the Oracle instances on node 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.
Rolling patching strategy incur no downtime, however, some rolling patches may incur downtime due to post-installation steps, i.e. running sql scripts to patch the actual database. Please refer to patch readme to find out whether post-installation steps require downtime or not.
  • Shutdown all the Oracle instances on node 1
  • Apply the patch to the RAC home on node 1
  • Start all the Oracle instances on node 1
  • Shutdown all the Oracle instances on node 2
  • Apply the patch to the RAC home on node 2
  • Start all the Oracle instances on node 2
  • Shutdown all the Oracle instances on node 3
  • Apply the patch to the RAC home on node 3
  • Start all the Oracle instances on node 3

The algorithm used to decide which method is going to be used is the following:

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


When patches are released, they have a tag as "rolling" or "not rolling" patch. While most patches can be applied in a rolling fashion, some patches cannot be applied in this fashion.

Patches that could potentially be installed on rolling fashion include:

  • Patches that do not affect the contents of the database.
  • Patches that are not related to the RAC internode communication infrastructure.
  • Patches that change procedural logic and do not modify common header definitions of kernel modules.
  • This includes client side patches that only affect utilities like export, import, sql*plus, sql*loader, etc.


Note: If you plan to apply a patch that is marked as "not rolling" and want to check if is possible to take advantage of the rolling patch strategy, please contact Oracle Support.

How to determine if a patch is a "rolling patch" or not?

As database user execute the following:

    - 9i or 10gR1: opatch query -is_rolling

    - 10gR2: opatch query -all [unzipped patch location] | grep rolling

    - 10gR2 on Windows: opatch query -all [unzipped patch location] | findstr rolling

    - Later 10gR2 or 11g: opatch query -is_rolling_patch [unzipped patch location]


Also, the type of OPatch can be determined by checking the <Patch Number>/etc/config/inventory file. If the variable online_rac_installable is set to
true then the patch is a rolling patch.

No comments:

Post a Comment

100 Oracle DBA Interview Questions and Answers

  Here are 100 tricky interview questions tailored for a Senior Oracle DBA role. These questions span a wide range of topics, including perf...