Environment Configuration Details:
Operating System: Redhat Enterprise Linux 8.4 64 Bit
Oracle and Grid Software version: 21.0.0.0
RAC: YES
Oracle and Grid Software version: 21.0.0.0
RAC: YES
Note: Here, I am applying patch to GRID home before starting grid software GUI. You can use same method for RDBMS home as well. Refer the readme file for RDBMS patches to be applied.
Step 1: Download any latest RU/RUR patches and apply the same.
It is highly recommended to apply patches while invoking installer and before starting GUI. Refer below steps to apply patch "Patch 33859395 - GI Release Update 21.6.0.0.220419" which is latest available patch. You can apply any latest available RU/RUR patch.
Download the patch from Oracle Support site and transfer the same to target server. Unzip the patch zip file by grid user only.
Note: If the patch directory owner is root or any other user other than installer user(grid), then it won't allow you to apply patch even though the permissions are 777. It is mandatory to have grid infrastructure owner and its group to patch directory.
[root@rac1 Oracle 21c Patch Apr-2022]# ll
total 1415696
-rwxrwx--- 1 root vboxsf 577909 Jun 22 19:50 'Oracle® Database Patch 33859395 - GI Release Update 21.6.0.0.220419.pdf'
-rwxrwx--- 1 root vboxsf 1449087073 Jun 22 20:32 p33859395_210000_Linux-x86-64.zip
[root@rac1 Oracle 21c Patch Apr-2022]# cp -pr p33859395_210000_Linux-x86-64.zip /u01/app/grid
[root@rac1 Oracle 21c Patch Apr-2022]#
[root@rac1 Oracle 21c Patch Apr-2022]# pwd
/media/sf_Software/RAC Setup/Oracle 21c/Oracle 21c Patch Apr-2022
[root@rac1 Oracle 21c Patch Apr-2022]#
[root@rac1 Oracle 21c Patch Apr-2022]# id
uid=0(root) gid=0(root) groups=0(root)
[root@rac1 Oracle 21c Patch Apr-2022]#
[root@rac1 Oracle 21c Patch Apr-2022]# cd /u01/app/grid/
[root@rac1 grid]# ll
total 1415128
-rwxrwx--- 1 root vboxsf 1449087073 Jun 22 20:32 p33859395_210000_Linux-x86-64.zip
[root@rac1 grid]#
[root@rac1 grid]# chown grid:oinstall p33859395_210000_Linux-x86-64.zip
[root@rac1 grid]# ll
total 1415128
-rwxrwx--- 1 grid oinstall 1449087073 Jun 22 20:32 p33859395_210000_Linux-x86-64.zip
[root@rac1 grid]#
[root@rac1 grid]# su - grid
[grid@rac1 ~]$
[grid@rac1 ~]$ cd /u01/app/grid/
[grid@rac1 grid]$
[grid@rac1 grid]$ ll
total 1415128
-rwxrwx--- 1 grid oinstall 1449087073 Jun 22 20:32 p33859395_210000_Linux-x86-64.zip
[grid@rac1 grid]$
[grid@rac1 grid]$ unzip p33859395_210000_Linux-x86-64.zip
Archive: p33859395_210000_Linux-x86-64.zip
creating: 33859395/
creating: 33859395/33853467/
creating: 33859395/33853467/files/
creating: 33859395/33853467/files/usm/
creating: 33859395/33853467/files/usm/install/
creating: 33859395/33853467/files/usm/install/cmds/
creating: 33859395/33853467/files/usm/install/cmds/bin/
inflating: 33859395/33853467/files/usm/install/cmds/bin/mount.acfs
inflating: 33859395/33853467/files/usm/install/cmds/bin/fsck.acfs
inflating: 33859395/33853467/files/usm/install/cmds/bin/mkfs.acfs.bin
inflating: 33859395/33853467/files/usm/install/cmds/bin/acfssihamount
inflating: 33859395/33853467/files/usm/install/cmds/bin/advmutil.bin
inflating: 33859395/33853467/files/usm/install/cmds/bin/advmutil
inflating: 33859395/33853467/files/usm/install/cmds/bin/fsck.acfs.bin
inflating: 33859395/33853467/files/usm/install/cmds/bin/mkfs.acfs
inflating: 33859395/33853467/files/usm/install/cmds/bin/acfsdbg.bin
.....
.....
inflating: 33859395/33853705/files/racg/mesg/clsre.msb
creating: 33859395/33853705/files/racg/lib/
inflating: 33859395/33853705/files/racg/lib/s0clsrmain.o
inflating: 33859395/33853705/files/racg/lib/s0clsrmdb.o
inflating: 33859395/33853705/files/racg/lib/s0clsreut.o
inflating: 33859395/33853705/files/racg/lib/s0clsrdmai.o
inflating: 33859395/33853705/files/racg/lib/ins_has.mk
inflating: 33859395/33853705/README.txt
inflating: 33859395/README.html
inflating: PatchSearch.xml
[grid@rac1 grid]$
[grid@rac1 grid]$ ll
total 1415132
drwxr-x--- 9 grid oinstall 175 Apr 9 19:00 33859395
-rwxrwx--- 1 grid oinstall 1449087073 Jun 22 20:32 p33859395_210000_Linux-x86-64.zip
-rw-rw-r-- 1 grid oinstall 2416 Apr 19 17:01 PatchSearch.xml
[grid@rac1 grid]$ cd 33859395
[grid@rac1 33859395]$ ll
total 136
drwxr-x--- 4 grid oinstall 48 Apr 9 19:03 33693511
drwxr-x--- 4 grid oinstall 67 Apr 9 19:00 33843745
drwxr-x--- 5 grid oinstall 62 Apr 9 19:00 33853467
drwxr-x--- 5 grid oinstall 62 Apr 9 19:03 33853705
drwxr-x--- 4 grid oinstall 48 Apr 9 19:03 33856167
drwxr-x--- 4 grid oinstall 48 Apr 9 19:03 33911162
drwxr-x--- 2 grid oinstall 4096 Apr 9 19:00 automation
-rw-rw-r-- 1 grid oinstall 6546 Apr 10 00:50 bundle.xml
-rw-r--r-- 1 grid oinstall 124143 Apr 10 00:37 README.html
-rw-r--r-- 1 grid oinstall 0 Apr 9 19:00 README.txt
[grid@rac1 33859395]$ pwd
/u01/app/grid/33859395
[grid@rac1 33859395]$ cd /u01/app/21.0.0/grid/
[grid@rac1 grid]$
[grid@rac1 grid]$ ls -ltr gridSetup.sh
-rwxr-x--- 1 grid oinstall 3294 Mar 8 2017 gridSetup.sh
[grid@rac1 grid]$
[grid@rac1 grid]$ ./gridSetup.sh -help
Usage: gridSetup.sh [<flag>] [<option>]
Following are the possible flags:
-help - display help.
-silent - run in silent mode. The inputs can be a response file or a list of command line variable value pairs.
[-ignorePrereqFailure - ignore all prerequisite checks failures.]
[-lenientInstallMode - perform the best effort installation by automatically ignoring invalid data in input parameters.]
-responseFile - specify the complete path of the response file to use.
-logLevel - enable the log of messages up to the priority level provided in this argument. Valid options are: severe, warning, info, config, fine, finer, finest.
-executePrereqs | -executeConfigTools | -createGoldImage | -switchGridHome | -downgrade | -dryRunForUpgrade
-executePrereqs - execute the prerequisite checks only.
-executeConfigTools - execute the config tools for an installed home.
[-skipStackCheck - skip the stack status check.]
-createGoldImage - create a gold image from the current Oracle home.
-destinationLocation - specify the complete path to where the created gold image will be located.
[-exclFiles - specify the complete paths to the files to be excluded from the new gold image.]
-switchGridHome - change the Oracle Grid Infrastructure home path.
[-zeroDowntimeGIPatching - execute switch grid home in zero impact patching mode.]
[-skipDriverUpdate - execute zero impact patching without driver update.]
-downgrade - To downgrade Grid Infrastructure back to old home (to be used only in the case of incomplete upgrade).
-silent - run in silent mode. The inputs can be a response file or a list of command line variable value pairs.
[-ignorePrereqFailure - ignore all prerequisite checks failures.]
[-lenientInstallMode - perform the best effort installation by automatically ignoring invalid data in input parameters.]
[-configmethod - Specify the method to execute scripts as privileged user. If not specified then user will be instructed to run the scripts by logging in as privileged user. Valid options are: root,sudo.]
[-sudopath - Specify the complete path to the sudo program. This is an optional argument. This is needed if 'sudo' is specified for the configmethod and 'sudo' program is not present in the default path.]
[-sudousername - Specify the name of sudoer.]
-dryRunForUpgrade - To perform a dry run of the Grid Infrastructure Upgrade process.
-debug - run in debug mode.
-waitForCompletion - wait for the completion of the installation, instead of spawning the installer and returning the console prompt.
-noconfig - do not execute the config tools.
-noconsole - suppress the display of messages in the console. The console is not allocated.
-ignoreInternalDriverError - ignore any internal driver errors.
-noCopy - perform the configuration without copying the software on to the remote nodes. Applicable only for Real Application Cluster(RAC) installs.
-applyRU - apply release update to the Oracle home.
-applyOneOffs - apply one-off patch to the Oracle home. Multiple one-off patches can be passed as a comma separated list of locations.
Step 2: Download required opatch setup and replace the existing opatch by new opatch.
Before applying patch, ensure that the current opatch version is the required one. If not then you need to refer the readme file and download the required or latest opatch version and then proceed for applying the patch.
Open the patch readme file and search "You must use the OPatch utility version" in section "OPatch Utility Information". Click on 6880880 and select your appropriate OS and opatch version.
Once you download the required opatch then you need to take backup of current opatch folder and replace the same using below method.
[grid@rac1 grid]$ ls -ld OPatch/
drwxr-xr-x 13 grid oinstall 303 Jul 28 2021 OPatch/
[grid@rac1 grid]$
[grid@rac1 grid]$ mv OPatch/ OPatch_bkp
[grid@rac1 grid]$
[root@rac1 Oracle 21c]# pwd
/media/sf_Software/RAC Setup/Oracle 21c
[root@rac1 Oracle 21c]# cp -pr p6880880_210000_Linux-x86-64.zip /u01/app/21.0.0/grid/
[root@rac1 Oracle 21c]# cd /u01/app/21.0.0/grid/
[root@rac1 grid]#
[root@rac1 grid]# chown grid:oinstall p6880880_210000_Linux-x86-64.zip
[root@rac1 grid]#
[grid@rac1 grid]$ pwd
/u01/app/21.0.0/grid
[grid@rac1 grid]$
[grid@rac1 grid]$ id
uid=1001(grid) gid=2000(oinstall) groups=2000(oinstall),2100(asmadmin),2200(dba),2300(oper),2400(asmdba),2500(asmoper)
[grid@rac1 grid]$
[grid@rac1 grid]$ unzip p
p6880880_210000_Linux-x86-64.zip plsql/ pylib/
perl/ precomp/ python/
[grid@rac1 grid]$ pwd
/u01/app/21.0.0/grid
[grid@rac1 grid]$ unzip p
p6880880_210000_Linux-x86-64.zip plsql/ pylib/
perl/ precomp/ python/
[grid@rac1 grid]$ unzip p6880880_210000_Linux-x86-64.zip
Archive: p6880880_210000_Linux-x86-64.zip
creating: OPatch/
inflating: OPatch/README.txt
inflating: OPatch/datapatch
inflating: OPatch/emdpatch.pl
inflating: OPatch/operr_readme.txt
creating: OPatch/scripts/
inflating: OPatch/scripts/opatch_wls.bat
inflating: OPatch/scripts/opatch_jvm_discovery
inflating: OPatch/scripts/viewAliasInfo.sh
inflating: OPatch/scripts/opatch_jvm_discovery.bat
inflating: OPatch/scripts/viewAliasInfo.cmd
inflating: OPatch/scripts/opatch_wls
inflating: OPatch/datapatch.bat
inflating: OPatch/opatch
creating: OPatch/private/
inflating: OPatch/private/commons-compress-1.21.jar
creating: OPatch/ocm/
creating: OPatch/ocm/lib/
creating: OPatch/ocm/bin/
creating: OPatch/ocm/doc/
extracting: OPatch/ocm/generic.zip
extracting: OPatch/version.txt
creating: OPatch/jlib/
inflating: OPatch/jlib/opatchsdk.jar
inflating: OPatch/jlib/oracle.opatch.classpath.windows.ja
....
...
creating: OPatch/modules/oracle.rsa/
inflating: OPatch/modules/oracle.rsa/cryptoj.jar
inflating: OPatch/modules/com.oracle.glcm.patch.opatch-common-api-schema_13.9.5.0.jar
inflating: OPatch/modules/com.sun.xml.bind.jaxb-xjc.jar
inflating: OPatch/modules/com.oracle.glcm.patch.opatch-common-api-interfaces_13.9.5.0.jar
[grid@rac1 grid]$
[grid@rac1 grid]$
[grid@rac1 grid]$
[grid@rac1 grid]$ ls -ld OPatch
drwxr-x--- 15 grid oinstall 4096 Apr 13 23:10 OPatch
[grid@rac1 grid]$
[grid@rac1 grid]$
[grid@rac1 grid]$ cd OPatch
[grid@rac1 OPatch]$
[grid@rac1 OPatch]$
[grid@rac1 OPatch]$ ls -ltr
total 152
drwxr-x--- 6 grid oinstall 198 Mar 23 14:39 jre
-rw-r----- 1 grid oinstall 27 Apr 13 23:04 version.txt
drwxr-x--- 2 grid oinstall 155 Apr 13 23:04 scripts
-rw-r----- 1 grid oinstall 2977 Apr 13 23:04 README.txt
drwxr-xr-x 2 grid oinstall 39 Apr 13 23:04 private
-rw-r----- 1 grid oinstall 3177 Apr 13 23:04 operr_readme.txt
-rwxr-x--- 1 grid oinstall 4218 Apr 13 23:04 operr.bat
-rwxr-x--- 1 grid oinstall 3159 Apr 13 23:04 operr
-rw-r----- 1 grid oinstall 2551 Apr 13 23:04 opatch.pl
-rwxr-x--- 1 grid oinstall 4290 Apr 13 23:04 opatch_env.sh
-rwxr-x--- 1 grid oinstall 16554 Apr 13 23:04 opatch.bat
-rwxr-x--- 1 grid oinstall 49873 Apr 13 23:04 opatch
drwxr-x--- 5 grid oinstall 58 Apr 13 23:04 ocm
-rwxr-x--- 1 grid oinstall 23550 Apr 13 23:04 emdpatch.pl
-rwxr-x--- 1 grid oinstall 627 Apr 13 23:04 datapatch.bat
-rwxr-x--- 1 grid oinstall 589 Apr 13 23:04 datapatch
drwxr-x--- 2 grid oinstall 31 Apr 13 23:04 config
drwxr-x--- 4 grid oinstall 62 Apr 13 23:04 opatchprereqs
drwxr-x--- 2 grid oinstall 320 Apr 13 23:04 jlib
drwxr-x--- 3 grid oinstall 24 Apr 13 23:10 plugins
drwxr-x--- 3 grid oinstall 21 Apr 13 23:10 oracle_common
drwxr-x--- 2 grid oinstall 19 Apr 13 23:10 oplan
-rwxr-x--- 1 grid oinstall 393 Apr 13 23:10 opatchauto.cmd
-rwxr-x--- 1 grid oinstall 1763 Apr 13 23:10 opatchauto
drwxr-x--- 8 grid oinstall 4096 Apr 13 23:10 modules
drwxr-x--- 2 grid oinstall 90 Apr 13 23:10 docs
drwxr-x--- 7 grid oinstall 83 Apr 13 23:10 auto
[grid@rac1 OPatch]$ cat version.txt
OPATCH_VERSION:12.2.0.1.30
[grid@rac1 OPatch]$
[grid@rac1 ~]$ cd /u01/app/21.0.0/grid
[grid@rac1 grid]$
[grid@rac1 grid]$ ll gridSetup.sh
-rwxr-x--- 1 grid oinstall 3294 Mar 8 2017 gridSetup.sh
[grid@rac1 grid]$
[grid@rac1 grid]$ id
uid=1001(grid) gid=2000(oinstall) groups=2000(oinstall),2100(asmadmin),2200(dba),2300(oper),2400(asmdba),2500(asmoper)
[grid@rac1 grid]$
Step 3: Apply the patch by applyRU command
[grid@rac1 grid]$ ./gridSetup.sh -applyRU /u01/app/grid/33859395
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
Preparing the home to patch...
Applying the patch /u01/app/grid/33859395...
Successfully applied the patch.
The log can be found at: /tmp/GridSetupActions2022-06-24_12-59-08PM/installerPatchActions_2022-06-24_12-59-08PM.log
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
[grid@rac1 grid]$
Note: You can apply multiple patches one by one by "-applyRU" command. If GUI screen will appear then you can cancel the GUI and proceed for another patch and so on.
Go to GRID_HOME and execute gridSetup.sh to start the setup wizard without -applyRU command or if you already canceled the GUI..
You have successfully applied the patch before software installation.
Thanks for reading this post ! Please comment if you like this post !
Thank you for your comment !