Monday, November 15, 2021

Oracle 19c root.sh not working while gridSetup.sh switchGridHome to software-only installation

When the command "griddSetup.sh -switchGridHome" is used to perform Oracle database 19c out of place (OOP) patching, it will prompt to run root.sh on each cluster node. And root.sh will switch Grid Home from old one (without new patches) to new one (applied with new patches) on each node and also patch Grid Infrastructure Management Repository (GIMR) database on last node of the cluster.

Unfortunately, roo.sh could only work on first node, and not on others if you deploy the software/patches in following steps,

Step 1. Install new GI home with software only option with command,

   ./gridSetup.sh -applyRU <RU_Patch_Location> -applyOneOffs <comma_separated_one-off_patches_location>

At the end of the installation, you will be asked to run root.sh on each node. This software-only version root.sh does not touch old GI home and any running cluster processes (listener, asm, etc.). The new home is applied with new patctes (specified by command option applyRU and/or applyOneOffs).

Step 2. Switch GI from old home to new patched home with command,

   ./gridSetup.sh -switchGridHome

This installation/configuration utility will create a new version of rootconfig.sh under directory "$ORACLE_HOME/crs/config" with home-switching and patching options enabled on local node (known as fist node), the affected options as following,
   Software-only version            New version
   ---------------------------      --------------------------
   PATCH_HOME=false                 PATCH_HOME=true
   MOVE_HOME=false                  MOVE_HOME=true
   TRANSPARENT_MOVE_HOME=false      TRANSPARENT_MOVE_HOME=true
   SWONLY_MULTINODE=true            SWONLY_MULTINODE=false
The rootconfig.sh is called by root.sh. Technically, the utility gridSetup.sh should copy this new version of rootconfig.sh to all other nodes. However, it does not always happen and you will see nothing being changed by root.sh on nodes other than first node where the utility is running. This issue is experienced when new home is patches with Oracle Release Update 19.13.0.0.211019.

If root.sh does not work on other nodes, you can fix it by manually copying new version of rootconfig.sh from first node to other nodes.

Note: Always make a backup of existing rootconfig.sh before overriding it with new rootconfig.sh copied from first node and it is also a good practice to compare two versions of rootconfig.sh and verify what the differences are. 

No comments: