Oracle Grid Infrastructure 19c Rollback from 19.32 to 19.30 Using switchGridHome
By Omer Narman | Soro Consulting
This article walks through a rolling Oracle Grid Infrastructure rollback from GI 19.32 to the retained GI 19.30 home at /opt/gi/19.30 in a two-node RAC cluster. The operation must be performed on both nodes, one at a time.
Complete the home switch on node 1 and validate its recovery, then repeat the same procedure on node 2. On each node, unlock the previous Grid home, run gridSetup.sh -switchGridHome from that home, execute the requested root script, and validate the configuration. After both nodes have been processed, verify the Grid homes, patch inventories, Clusterware services, and application connectivity across the cluster.
This walkthrough explains those commands, an environment-setting detail that is easy to miss, and the additional checks needed to close a rollback across the cluster.
When this approach applies
Oracle documents switching back to a retained Grid home after the switch to the newer home has completed on all nodes. It separately documents recovery from a failed patching attempt using the prepatch and postpatch rollback procedure. Choose the procedure that matches the actual state of the cluster.
The home-switch mechanism applies between Release Updates of the same release. Here, both 19.32 and 19.30 belong to Oracle Database 19c. See Oracle’s Patching and Switching Oracle Grid Infrastructure Homes.
Item | Value in this example |
Source GI Release Update | 19.32 |
Target GI Release Update | 19.30 |
Retained target Grid home | /opt/gi/19.30 |
GI software owner in the examples | grid |
Node selected for each switch | Current node, using hostname; repeat on node 2 |
Root script execution | Manual |
Scope of the procedure | Both RAC nodes, processed sequentially |
Use the actual GI software owner in your environment; installations with separate ownership commonly use grid. This procedure concerns the GI home. It does not itself roll back RDBMS homes or database SQL patch state.
Prepare the rollback
Before adapting these commands to another environment, confirm that the previous home is intact and contains the intended RU and required one-off patches. A directory named 19.30 is not sufficient evidence of its installed patch level.
Record the current home and patch inventory on every node, retain the relevant configuration backups and logs, and confirm the node order and service plan against the applicable patch README and Oracle guidance. Resolve any incomplete patching state before selecting the switch-back procedure.
The commands below do not request zero-downtime GI patching. Plan for local resource interruption and verify application continuity separately. Oracle’s zero-downtime GI patching procedure has its own eligibility conditions and execution options; an out-of-place home switch alone does not establish zero downtime.
Step 1 Unlock the previous Grid home
Start on node 1 and complete Steps 1–5. Then repeat Steps 1–5 on node 2, as described in Step 6. Run this command as root on the node being processed:
export OLD_GRID_HOME=/opt/gi/19.30
cd "$OLD_GRID_HOME/crs/install"
./rootcrs.sh -unlock -crshome "$OLD_GRID_HOME"The session returned:
CLSRSC-347: Successfully unlock /opt/gi/19.30Here, OLD_GRID_HOME refers to the retained home that will become active again. Keep that meaning consistent throughout the procedure.
Step 2 Set the GI owner environment explicitly
Switch to the GI software owner. The examples below use the grid account:
su - gridThen set the target home and local node:
export OLD_GRID_HOME=/opt/gi/19.30
export ORACLE_HOME="$OLD_GRID_HOME"
export CURRENT_NODE="$(hostname)"Check the values before continuing:
printf 'ORACLE_HOME=%s\nCURRENT_NODE=%s\n' \
"$ORACLE_HOME" "$CURRENT_NODE"One detail in this session deserves attention: after selecting the ASM SID with oraenv, the environment message still referred to a working database home at /opt/oracle/product/db/19.30. Explicitly setting ORACLE_HOME removed that ambiguity for the installer command.
Also confirm that CURRENT_NODE matches the node name registered in Clusterware. Do not assume that every server’s short hostname and registered cluster name are interchangeable.
Step 3 Run switchGridHome from the 19.30 home
As the GI software owner, run:
"$ORACLE_HOME/gridSetup.sh" \
-silent -switchGridHome \
oracle.install.option=CRS_SWONLY \
ORACLE_HOME="$ORACLE_HOME" \
oracle.install.crs.config.clusterNodes="$CURRENT_NODE" \
oracle.install.crs.rootconfig.executeRootScript=falseThis invocation targets the current node and disables automatic root-script execution. Run it first on node 1. When repeating the procedure on node 2, set CURRENT_NODE="$(hostname)" again in that node’s shell so the installer targets node 2.
The installer requested:
As a root user, execute the following script(s):
1. /opt/gi/19.30/root.shIt also reported:
Successfully Setup Software.That message marks completion of the software-setup stage. The requested root script still has to run before validating the home switch.
Step 4 Execute the requested root script
Return to the root shell and define the target home again. Shell variables set in the GI owner’s login session do not automatically propagate back to the parent root shell.
exit
export OLD_GRID_HOME=/opt/gi/19.30
"$OLD_GRID_HOME/root.sh"The command printed the location of its root-script log under:
/opt/gi/19.30/install/Review the exact log file named by the command, together with the installer logs. A return to the shell prompt is not, by itself, a sufficient completion check.
Step 5 Validate the home and Clusterware state
Run these checks after root.sh on each node. Confirm that node 1 has recovered before starting the same procedure on node 2.
Check the configured Grid home
"$OLD_GRID_HOME/srvm/admin/getcrshome"Recorded output:
/opt/gi/19.30The command must return /opt/gi/19.30 on each node after its switch. Check it on both nodes before closing the rollback.
Check the cluster version and patch state
"$OLD_GRID_HOME/bin/crsctl" query crs activeversion -fThe following recorded values illustrate the final cluster state. During the transition between node 1 and node 2, the cluster can remain in ROLLING PATCH mode. Require NORMAL after both nodes have completed the rollback.
Field | Recorded value |
Active Clusterware version | 19.0.0.0.0 |
Cluster upgrade state | NORMAL |
Cluster active patch level | 1558972750 |
The base version 19.0.0.0.0 does not identify the installed RU. Likewise, the numeric patch-level value should be compared with the intended baseline; it is not a universal label for GI 19.30.
Check the local Clusterware stack
"$OLD_GRID_HOME/bin/crsctl" check clusterRecorded output:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is onlineWithout -all or a node list, this command checks the local server. Run it on node 1 after its switch and again on node 2 after its switch, then run the cluster-wide check in Step 6. Validate databases and application services separately. Oracle explains the command scope in its CRSCTL Utility Reference.
Step 6 Repeat on node 2 and validate both nodes
After node 1 is healthy, log in to node 2 and repeat Steps 1–5 in full: unlock its retained 19.30 home as root, switch to grid, set OLD_GRID_HOME, ORACLE_HOME, and CURRENT_NODE in that node’s session, run gridSetup.sh -switchGridHome, execute /opt/gi/19.30/root.sh as root, and run the local validation checks. Do not process both nodes simultaneously. Once node 2 is healthy, perform the following checks across the cluster.
As root, check cluster-wide status:
export OLD_GRID_HOME=/opt/gi/19.30
"$OLD_GRID_HOME/bin/crsctl" check cluster -all
"$OLD_GRID_HOME/bin/crsctl" query crs activeversion -fOn both node 1 and node 2, set the home variable and check the registered home and patch information:
export OLD_GRID_HOME=/opt/gi/19.30
"$OLD_GRID_HOME/srvm/admin/getcrshome"
"$OLD_GRID_HOME/bin/crsctl" query crs softwarepatch
"$OLD_GRID_HOME/bin/crsctl" query crs releasepatchsoftwarepatch reports the configured patch level; releasepatch reports the local Grid-home patch repository level. Compare the results across nodes and against the planned baseline using the CRSCTL reference.
As the GI software owner, inspect the target home’s patch inventory on each node:
export OLD_GRID_HOME=/opt/gi/19.30
export ORACLE_HOME="$OLD_GRID_HOME"
"$ORACLE_HOME/OPatch/opatch" lspatches
"$ORACLE_HOME/OPatch/opatch" lsinventoryUse the patch descriptions and IDs to confirm the intended 19.30 baseline and required one-offs. Oracle documents these inventory commands in OPatch Syntax and Commands.
Finally, validate ASM, listeners, databases, services, and application connectivity against the pre-change baseline. Keep the previous and newer homes available until validation and the agreed retention period are complete.
What this rollback demonstrates
Retaining the previous GI home provides a direct path back to the earlier configuration. In a two-node RAC cluster, completion means both nodes point to the intended 19.30 home, their patch inventories match the planned baseline, the cluster reports NORMAL, and the required services and applications pass validation.
The practical lesson is to make home selection explicit at every stage: unlock the intended home, invoke its installer, run its requested root script, and verify both the resulting configuration and patch inventory. Completion across a RAC cluster requires that evidence for every affected node, together with a successful application check.
Soro Consulting supports Oracle RAC and Grid Infrastructure operations, patching and rollback planning, high availability, and database automation.
Comments