Blog

                                                                          RAC 19C PATCHING

NODE1

winscp latest patch to /u01/patches and unzip and change opatch version on both GH and OH

oracle@oraclenode1 ~]$ cd /u01/patches/
[oracle@oraclenode1 patches]$ ls -ltrh
total 5.5G
-rw-r--r--. 1 oracle oinstall 2.9G Feb 18 01:53 V982063-01.zip
-rw-r--r--. 1 oracle oinstall 2.5G Feb 20 07:52 p33509923_190000_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall 118M Feb 20 07:52 p6880880_190000_Linux-x86-64.zip
[oracle@oraclenode1 patches]$ unzip p33509923_190000_Linux-x86-64.zip
[root@oraclenode2 patches]# su - oracle
Last login: Sun Feb 20 10:15:55 IST 2022
[oracle@oraclenode1 ~]$ mv OPatch OPatch_backup
mv: cannot stat ‘OPatch’: No such file or directory
[oracle@oraclenode1 ~]$ cd /u01/app/19.0.0.0/grid/
[oracle@oraclenode1 grid]$ mv OPatch OPatch_backup
mv: cannot move ‘OPatch’ to ‘OPatch_backup/OPatch’: Permission denied
[oracle@oraclenode2 grid]$ logout
[root@oraclenode1 patches]# cd /u01/app/19.0.0.0/grid/
[root@oraclenode1 grid]# mv OPatch OPatch_backup
[root@oraclenode1grid]# cd /u01/patches
[root@oraclenode1 patches]#  unzip  p6880880_122010_Linux-x86-64.zip -d /u01/app/19.0.0.0/grid/
[root@oraclenode1 patches]# cd /u01/app/19.0.0.0/grid/
[root@oraclenode1 grid]# ls -ld OPatch
drwxr-x---. 15 root root 4096 Jan  9 19:29 OPatch
[root@oraclenode1 grid]# chown -R oracle: OPatch
[root@oraclenode1 grid]# ls -ld OPatch
drwxr-x---. 15 oracle oinstall 4096 Jan  9 19:29 OPatch
[root@oraclenode1 grid]# /u01/app/19.0.0.0/grid/OPatch/opatch version
OPatch Version: 12.2.0.1.29

 

OPatch succeeded.

Last login: Fri May  6 15:04:25 2022
[oracle@oraclelab1 ~]$ cd /u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclelab1 dbhome_1]$ mv OPatch OPatch_backup
[oracle@oraclelab1 dbhome_1]$  cd /u01/patches
[oracle@oraclelab1 patches]$ ll
total 2682068
drwxr-x---. 8 oracle oinstall       4096 Jan 13 09:48 33509923
-rw-r--r--. 1 oracle oinstall 2622069290 Apr 18 19:25 p33509923_190000_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall  122883929 May  5 21:51 p6880880_122010_Linux-x86-64.zip
-rw-rw-r--. 1 oracle oinstall    1478442 Jan 20 10:55 PatchSearch.xml
[oracle@oraclelab1 patches]$ unzip p6880880_122010_Linux-x86-64.zip -d /u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclelab1 patches]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch version
OPatch Version: 12.2.0.1.29

OPatch succeeded.

[oracle@oraclelab1 patches]$
Patch conflict check manual
GH
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33515361
[oracle@oraclelab1 ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM1
The Oracle base has been set to /u01/app/oracle
[oracle@oraclelab1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33515361
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2022-05-06_15-44-59PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33529556
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33534448
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33239955
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33575402
OH
[oracle@oraclelab1 ~]$ . oraenv
ORACLE_SID = [+ASM1] ? RACDB1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclelab1 ~]$
[oracle@oraclelab1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33515361
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2022-05-06_15-51-51PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[oracle@oraclelab1 ~]$
 $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33529556

 

System conflict check Manaul

[oracle@oraclelab1 patches]$ rm -rf p33509923_190000_Linux-x86-64.zip
[oracle@oraclelab1 patches]$ rm -rf p6880880_122010_Linux-x86-64.zip
[oracle@oraclelab1 patches]$ ll
total 1448
drwxr-x---. 8 oracle oinstall 4096 Jan 13 09:48 33509923
-rw-rw-r--. 1 oracle oinstall 1478442 Jan 20 10:55 PatchSearch.xml
[oracle@oraclelab1 patches]$
GH
[oracle@oraclelab1 patches]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/33509923/33515361
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2022-05-06_16-24-51PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.

[oracle@oraclelab1 patches]$

$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/33509923/33529556
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/33509923/33534448
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/33509923/33239955
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/33509923/33575402
OH
[oracle@oraclelab1 patches]$ . oraenv
ORACLE_SID = [+ASM1] ? +RACDB1
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19.0.0.0/dbhome_1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclelab1 patches]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/33509923/33515361
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2022-05-06_16-28-58PM_1.log
Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.
[oracle@oraclelab1 patches]$

 $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/33509923/33529556

Apply patch Manual

BEFORE APPLYING PATCH BASE PATCHES 

 

GH

[oracle@oraclelab1 ~]$ . oraenv
ORACLE_SID = [+RACDB1] ? +ASM1
The Oracle base has been changed from /home/oracle to /u01/app/oracle
[oracle@oraclelab1 ~]$ /u01/app/19.0.0.0/grid/OPatch/opatch lspatches
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517247;ACFS RELEASE UPDATE 19.3.0.0.0 (29517247)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)
29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763)

OPatch succeeded.

[oracle@oraclelab1 ~]$
OH
[oracle@oraclelab1 ~]$ . oraenv
ORACLE_SID = [+RACDB1] ? +RACDB1
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclelab1 ~]$  /u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lspatches
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)
OPatch succeeded.
[oracle@oraclelab1 ~]$
[root@oraclelab1 ~]# ps -ef|grep pmon
oracle    6600     1  0 14:32 ?        00:00:00 asm_pmon_+ASM1
oracle    9308     1  0 14:32 ?        00:00:01 ora_pmon_RACDB1
root     10805 10417  0 18:04 pts/0    00:00:00 grep --color=auto pmon
[root@oraclelab1 ~]# /u01/app/19.0.0.0/grid/crs/install/rootcrs.sh -prepatch
Using configuration parameter file: /u01/app/19.0.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/oracle/crsdata/oraclelab1/crsconfig/crs_prepatch_oraclelab1_2022-05-06_06-05-02PM.log
Oracle Clusterware active version on the cluster is [19.0.0.0.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [724960844].
2022/05/06 18:06:07 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.
2022/05/06 18:07:47 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.
2022/05/06 18:07:50 CLSRSC-347: Successfully unlock /u01/app/19.0.0.0/grid
2022/05/06 18:07:53 CLSRSC-671: Pre-patch steps for patching GI home successfully completed.
[root@oraclelab1 ~]# ps -ef|grep pmon
root     14271 10417  0 18:08 pts/0    00:00:00 grep --color=auto pmon
[root@oraclelab1 ~]#
/u01/app/19.0.0.0/grid/OPatch/opatch apply -oh /u01/app/19.0.0.0/grid -local -silent /u01/patches/33509923/33515361
[oracle@oraclelab1 ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM1
The Oracle base has been set to /u01/app/oracle
[oracle@oraclelab1 ~]$ /u01/app/19.0.0.0/grid/OPatch/opatch apply -oh /u01/app/19.0.0.0/grid -local -silent /u01/patches/33509923/33515361
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2022-05-06_18-11-14PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   33515361
Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/19.0.0.0/grid')

Patching component oracle.network.listener, 19.0.0.0.0...

Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...

Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...

Patching component oracle.jdk, 1.8.0.201.0...
Patch 33515361 successfully applied.
/u01/app/19.0.0.0/grid/OPatch/opatch apply -oh /u01/app/19.0.0.0/grid -local -silent /u01/patches/33509923/33529556
/u01/app/19.0.0.0/grid/OPatch/opatch apply -oh /u01/app/19.0.0.0/grid -local -silent /u01/patches/33509923/33534448
/u01/app/19.0.0.0/grid/OPatch/opatch apply -oh /u01/app/19.0.0.0/grid -local -silent /u01/patches/33509923/33239955
/u01/app/19.0.0.0/grid/OPatch/opatch apply -oh /u01/app/19.0.0.0/grid -local -silent 
/u01/patches/33509923/33575402
[oracle@oraclelab1 ~]$ /u01/app/19.0.0.0/grid/OPatch/opatch lspatches
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)
33239955;TOMCAT RELEASE UPDATE 19.0.0.0.0 (33239955)
33534448;ACFS RELEASE UPDATE 19.14.0.0.0 (33534448)
33529556;OCW RELEASE UPDATE 19.14.0.0.0 (33529556)
33515361;Database Release Update : 19.14.0.0.220118 (33515361)
OPatch succeeded.
[oracle@oraclelab1 ~]$ /u01/app/19.0.0.0/grid/OPatch/opatch lsinv |grep applied
Patch  33575402     : applied on Fri May 06 18:25:33 IST 2022
Patch  33239955     : applied on Fri May 06 18:19:37 IST 2022
Patch  33534448     : applied on Fri May 06 18:19:03 IST 2022
Patch  33529556     : applied on Fri May 06 18:18:24 IST 2022
Patch  33515361     : applied on Fri May 06 18:12:39 IST 2022
[oracle@oraclelab1 ~]$ /u01/app/19.0.0.0/grid/OPatch/opatch lsinv |grep desc
ARU platform description:: Linux x86-64
Patch description:  "DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)"
Patch description:  "TOMCAT RELEASE UPDATE 19.0.0.0.0 (33239955)"
Patch description:  "ACFS RELEASE UPDATE 19.14.0.0.0 (33534448)"
Patch description:  "OCW RELEASE UPDATE 19.14.0.0.0 (33529556)"
Patch description:  "Database Release Update : 19.14.0.0.220118 (33515361)"
[oracle@oraclelab1 ~]$ /u01/app/19.0.0.0/grid/OPatch/opatch lspatches -oh /u01/app/19.0.0.0/grid
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)
33239955;TOMCAT RELEASE UPDATE 19.0.0.0.0 (33239955)
33534448;ACFS RELEASE UPDATE 19.14.0.0.0 (33534448)
33529556;OCW RELEASE UPDATE 19.14.0.0.0 (33529556)
33515361;Database Release Update : 19.14.0.0.220118 (33515361)
OPatch succeeded.
[oracle@oraclelab1 ~]$

NOTE:—-

[oracle@oraclelab2 ~]$ . oraenv
ORACLE_SID = [+ASM1] ? +ASM2
The Oracle base has been set to /u01/app/oracle
[oracle@oraclelab2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Fri May 6 18:32:43 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> SELECT SYS_CONTEXT('SYS_CLUSTER_PROPERTIES', 'CLUSTER_STATE') FROM DUAL;

SYS_CONTEXT('SYS_CLUSTER_PROPERTIES','CLUSTER_STATE')
--------------------------------------------------------------------------------
In Rolling Patch
SQL>

OH PATCHING MANUAL

/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch apply -oh /u01/app/oracle/product/19.0.0.0/dbhome_1 -local -silent /u01/patches/33509923/33515361
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch apply -oh /u01/app/oracle/product/19.0.0.0/dbhome_1 -local -silent /u01/patches/33509923/33529556

Lock and start GI as root user(cluster and database home started)

$ORACLE_HOME/crs/install/roothas.sh -postpatch

End of node1 patch

NODE2

 

scp latest patch to /u01/patches and unzip and change opatch version on both GH and OH

[oracle@oraclelab2 patches]$ ll
total 2682068
drwxr-x---. 8 oracle oinstall       4096 Jan 13 09:48 33509923
-rw-r--r--. 1 oracle oinstall 2622069290 May  6 14:19 p33509923_190000_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall  122883929 May  6 14:20 p6880880_122010_Linux-x86-64.zip
-rw-rw-r--. 1 oracle oinstall    1478442 Jan 20 10:55 PatchSearch.xml
[oracle@oraclelab2 patches]$

Update patch version GH and OH

GH
[oracle@oraclelab2 ~]$ cd /u01/app/19.0.0.0/grid/
[oracle@oraclelab2 grid]$ mv OPatch OPatch_backup
mv: cannot move ‘OPatch’ to ‘OPatch_backup’: Permission denied
[oracle@oraclelab2 grid]$ su - root
Password:
Last login: Fri May  6 14:15:47 IST 2022 from 192.168.0.113 on pts/0
[root@oraclelab2 ~]# cd /u01/app/19.0.0.0/grid/
[root@oraclelab2 grid]# cd /u01/patches
[root@oraclelab2 patches]#  unzip p6880880_190000_Linux-x86-64.zip -d /u01/app/19.0.0.0/grid/
unzip:  cannot find or open p6880880_190000_Linux-x86-64.zip, p6880880_190000_Linux-x86-64.zip.zip or p6880880_190000_Linux-x86-64.zip.ZIP.
[root@oraclelab2 patches]# ll
total 2682068
drwxr-x---. 8 oracle oinstall       4096 Jan 13 09:48 33509923
-rw-r--r--. 1 oracle oinstall 2622069290 May  6 14:19 p33509923_190000_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall  122883929 May  6 14:20 p6880880_122010_Linux-x86-64.zip
-rw-rw-r--. 1 oracle oinstall    1478442 Jan 20 10:55 PatchSearch.xml
[root@oraclelab2 patches]#  unzip  p6880880_122010_Linux-x86-64.zip -d /u01/app/19.0.0.0/grid/
Archive:  p6880880_122010_Linux-x86-64.zip
replace /u01/app/19.0.0.0/grid/OPatch/README.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: ^C[root@oraclelab2 patches]# ^C
[root@oraclelab2 patches]# cd /u01/app/19.0.0.0/grid/
[root@oraclelab2 grid]#  mv OPatch OPatch_backup
[root@oraclelab2 grid]#  unzip  p6880880_122010_Linux-x86-64.zip -d /u01/app/19.0.0.0/grid/
unzip:  cannot find or open p6880880_122010_Linux-x86-64.zip, p6880880_122010_Linux-x86-64.zip.zip or p6880880_122010_Linux-x86-64.zip.ZIP.
[root@oraclelab2 grid]# cd  /u01/patches
[root@oraclelab2 patches]# ll
total 2682068
drwxr-x---. 8 oracle oinstall       4096 Jan 13 09:48 33509923
-rw-r--r--. 1 oracle oinstall 2622069290 May  6 14:19 p33509923_190000_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall  122883929 May  6 14:20 p6880880_122010_Linux-x86-64.zip
-rw-rw-r--. 1 oracle oinstall    1478442 Jan 20 10:55 PatchSearch.xml
[root@oraclelab2 patches]#  unzip  p6880880_122010_Linux-x86-64.zip -d /u01/app/19.0.0.0/grid/
[root@oraclelab2 patches]# chown -R oracle: OPatch
chown: cannot access ‘OPatch’: No such file or directory
[root@oraclelab2 patches]# cd /u01/app/19.0.0.0/grid/
[root@oraclelab2 grid]# chown -R oracle: OPatch
[root@oraclelab2 grid]# ls -ld OPatch
drwxr-x---. 15 oracle oinstall 4096 Jan  9 19:29 OPatch
[root@oraclelab2 grid]# /u01/app/19.0.0.0/grid/OPatch/opatch version
OPatch Version: 12.2.0.1.29
OPatch succeeded.
[root@oraclelab2 grid]#

OH

[oracle@oraclelab2 patches]$ cd /up01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclelab2 dbhome_1]$  mv OPatch OPatch_backup
[oracle@oraclelab2 dbhome_1]$  cd /u01/patches
[oracle@oraclelab2 patches]$ unzip p6880880_122010_Linux-x86-64.zip -d /u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclelab2 patches]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch version
OPatch Version: 12.2.0.1.29
OPatch succeeded.
[oracle@oraclelab2 patches]$

PATCH CONFLICT CHECK USING SCRIPT

GH
vi /tmp/patch_list_gihome.txt

/u01/patches/33509923/33515361
/u01/patches/33509923/33529556
/u01/patches/33509923/33534448
/u01/patches/33509923/33239955
/u01/patches/33509923/33575402

:wq!
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseFile /tmp/patch_list_gihome.txt
[oracle@oraclelab2 ~]$ vi /tmp/patch_list_gihome.txt
[oracle@oraclelab2 ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM2
The Oracle base has been set to /u01/app/oracle
[oracle@oraclelab2 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseFile /tmp/patch_list_gihome.txt
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2022-05-06_16-09-28PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@oraclelab2 ~]$

OH

[oracle@oraclelab2 ~]$ vi /tmp/patch_list_dbhome.txt
/u01/patches/33509923/33515361
/u01/patches/33509923/33529556

:wq!
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseFile  /tmp/patch_list_dbhome.txt
[oracle@oraclelab2 ~]$ . oraenv
ORACLE_SID = [RACDB2] ? RACDB2
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19.0.0.0/dbhome_1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclelab2 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseFile  /tmp/patch_list_dbhome.txt
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.29
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2022-05-06_16-16-25PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@oraclelab2 ~]$

System conflict check using script

[oracle@oraclelab2 ~]$ cd /u01/patches
[oracle@oraclelab2 patches]$ ll
total 2682068
drwxr-x---. 8 oracle oinstall       4096 Jan 13 09:48 33509923
-rw-r--r--. 1 oracle oinstall 2622069290 May  6 14:19 p33509923_190000_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall  122883929 May  6 14:20 p6880880_122010_Linux-x86-64.zip
-rw-rw-r--. 1 oracle oinstall    1478442 Jan 20 10:55 PatchSearch.xml
[oracle@oraclelab2 patches]$ rm -rf  p33509923_190000_Linux-x86-64.zip
[oracle@oraclelab2 patches]$ rm -rf p6880880_122010_Linux-x86-64.zip
[oracle@oraclelab2 patches]$

GH

 $ORACLE_HOME/OPatch/opatch prereq  CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
[oracle@oraclenode1 33509923]$ . oraenv
ORACLE_SID = [+DEVDB1] ? +ASM2
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclenode1 33509923]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
Oracle Interim Patch Installer version 12.2.0.1.25
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version : 12.2.0.1.25
OUI version : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2022-02-20_09-14-20AM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.
OPatch succeeded.

OH

[oracle@oraclelab2 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2022-05-06_17-00-58PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.
[oracle@oraclelab2 ~]$

APPLY PATCH ON GH AND OH SEPARATELY ON  NODE2 USING AUTO PATCH

 

ANALYSES COMMAND IS FOR OPATCH CONFLICT CHECK AND SYSTEM CONFLICT  CHECK ON BOTH GH AND OH 

 

2

 

OR APPLY ON BOTH GH AND OH TOGETHER WITH ONE COMMAND

/u01/app/19.0.0.0/grid/OPatch/opatchauto apply /u01/patches/33509923 -oh /u01/app/19.0.0.0/grid,/u01/app/oracle/product/19.0.0.0/dbhome_1

Database patching manual 

 

Database Patching:

==================

1) Do database prechks

column comp_name format a40

column version format a12

column status format a15

select comp_name,version,status from dba_registry;

 

column owner format a15

column object_name format a40

column object_type format a20

select owner, object_name, object_type from dba_objects where status=’INVALID’ and owner like ‘%SYS%’ order by object_type,owner,object_name;

@?/rdbms/admin/utlprp.sql 16

2) Run the database post steps

cd $ORACLE_HOME/OPatch
./datapatch -verbose

3) Verify the database post steps

set pagesize 1000;
set linesize 1000;
col STATUS for a10;
col ACTION_TIME format a30;
col DESCRIPTION format a55;
select PATCH_ID,status,ACTION_TIME,DESCRIPTION from dba_registry_sqlpatch;

Here on node2 auto patch command is used so database patch is done automatically    

Here on node2 auto patch command is used so database patch is done automatically    

Hope it Helps.

Follow me

Contact us for Training/ Job Support

Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.