LINUXOR.SK ... open source notes ...

Oracle RAC - Grid patch commands

category: solutionz · date: 2016-12-31 · updated: 2026-10-02 · author: LALA

Oracle RAC Solution · Config document · referenced from Grid patches and the multicast problem

noteThe last block, the cumulative patches 20760982 and 20996923, is a dead end: it was applied against a problem whose cause was the network, and it did not help. Do not copy it as part of the fix.

The commands that replaced OPatch in the Grid home and applied patch 17475946, without which root.sh fails on SUSE Linux Enterprise Server 11 SP3, followed by the commands that applied two cumulative patches while the second node would not join the cluster.

ItemValue
Grid home/data/u01/app/grid11204
Archives/data/install/p17475946_112040_Linux-x86-64.zip, /data/install/p6880880_112000_Linux-x86-64.zip
Unpacked patches/data/install/17475946, /data/install/20760982, /data/install/20996923
Run asroot; the lines after su - grid as grid; the root scripts orainstRoot.sh and root.sh as root
Run onnot stated in the notes; opatch … -local patches only the node it runs on
SoftwareGrid Infrastructure 11.2.0.4, OPatch from patch 6880880

The commands

The notes write every line with the root prompt and switch users with su: after su - grid the lines run as grid, after su - as root again. The two root scripts, orainstRoot.sh and root.sh, are the exception: they follow lines run as grid, but they ran as root. The notes show no su - before them; they write them under titles that say "as the user root" and with the node in the prompt, the pair once for oradb01 and once for oradb02, which is why each pair stands twice in the fence. The table after the fence divides the lines into the steps of the notes.

bash
$ cd /data/install
$ unzip ./p17475946_112040_Linux-x86-64.zip
$ chmod -R 777 ./17475946/
$ cd /data/install
$ unzip ./p6880880_112000_Linux-x86-64.zip
$ mv /data/u01/app/grid11204/OPatch /data/u01/app/grid11204/OPatch-old
$ cp -R /data/install/OPatch /data/u01/app/grid11204/
$ chown -R grid:oinstall /data/u01/app/grid11204/OPatch
$ chmod -R 755 /data/u01/app/grid11204/OPatch
$ su -
$ chown grid /data/u01/app/grid11204/
$ chown -R grid /data/u01/app/grid11204/bin/
$ chown -R grid /data/u01/app/grid11204/lib/
$ su - grid
$ cd /data/u01/app/grid11204/OPatch/
$ ./opatch napply -oh /data/u01/app/grid11204 -local /data/install/17475946
$ /data/u01/app/oraInventory/orainstRoot.sh
$ /data/u01/app/grid11204/root.sh
$ /data/u01/app/oraInventory/orainstRoot.sh
$ /data/u01/app/grid11204/root.sh
$ su -
$ chown grid /data/u01/app/grid11204/
$ chown -R grid /data/u01/app/grid11204/bin/
$ chown -R grid /data/u01/app/grid11204/lib/
$ su - grid
$ cd /data/u01/app/grid11204/OPatch/
$ ./opatch napply -oh /data/u01/app/grid11204 -local /data/install/20760982
$ su -
$ chown -R grid /data/u01/app/grid11204/crs/
$ chown -R grid /data/u01/app/grid11204/jlib/
$ su - grid
$ cd /data/u01/app/grid11204/OPatch/
$ ./opatch napply -oh /data/u01/app/grid11204 -local /data/install/20996923
$ /data/u01/app/oraInventory/orainstRoot.sh
$ /data/u01/app/grid11204/root.sh
$ /data/u01/app/oraInventory/orainstRoot.sh
$ /data/u01/app/grid11204/root.sh
LinesStep in the notesWhat it does
1 to 3[2]Unpacks the patch for SLES 11 SP3 and makes it readable for everyone
4 to 5[2]Unpacks the newer OPatch; the archive holds a directory OPatch
6[2]Moves the OPatch that came with 11.2.0.4 aside
7 to 9[2]Copies the new OPatch into the Grid home, owner grid:oinstall, mode 755
10 to 16[2]Gives the home directory, bin and lib back to grid, then applies patch 17475946 to the local home as grid
17 to 18[2]The two root scripts again, as root, on oradb01
19 to 20[2]The same pair, as root, on oradb02, only after root.sh has finished on oradb01
21 to 27[X.1]Dead end: the same ownership changes, then the cumulative patch 20760982
28 to 33[X.1]Dead end: crs and jlib given to grid, then the cumulative patch 20996923
34 to 35[X.2]Dead end: the two root scripts again, as root, on oradb01
36 to 37[X.3]Dead end: the same pair, as root, on oradb02

The opatch options: napply applies the patches found in the given directory, -oh names the Oracle home, -local limits the work to the local node.

What does not agree in the notes:

Checked against Oracle Grid Infrastructure 26ai

As builtToday
opatch napply -oh … -local as grid, after chown of parts of the home by handFor a configured Grid home the documented tool is opatchauto apply, run as root. Plain opatch as the Grid user is documented for the case that the Clusterware stack does not start
Patch applied after a failed root.shPatches are applied during setup with gridSetup.sh -applyRU and -applyOneOffs
Out-of-place patching with OPatchDeprecated; in-place patching is not affected. Oracle recommends out-of-place patching with gold images
ACFS drivers missing for the SLES 11 SP3 kernelThe supported kernels are listed in the guide; for SLES they are those of 15 SP5 and later

What the two cumulative patches contain was not checked; My Oracle Support needs a login.

← solutionz