crsctl stat res -t
确认集群状态正常,19crac补丁除了OVJM,GI和DB在opatchauto apply方式允许与集群服务并行运行,在打补丁期间集群服务、数据库服务、其他相关服务会自动重启。
建议:打补丁前对GI HOME、ORACLE HOME软件安装目录进行备份,如果补丁应用过程中发生意外无法正常启动集群或者出现报错需要回退,将之前的压缩包解压复制当前目录。(仅用于打补丁未注册的情况,如果GI补丁在一节点二节点已注册,DB补丁在其他节点注册前发生错误,查看报错日志确定原因后,如果可以解决就按照readme步骤resume,如果无法处理错误,选择对所有补丁进行回滚。)
##一节点
[root@antute01 patch]# cd /u01/app/19.0.0/grid/
[root@antute01 grid]# cd ..
[root@antute01 19.0.0]# ls
grid
[root@antute01 19.0.0]# pwd
/u01/app/19.0.0
--备份GI_HOME
[root@antute01 19.0.0]# tar -cvzf grid.tar.gz grid/
[root@antute01 19.0.0]# ls
grid grid.tar.gz
--备份oracle_home
[root@antute01 19.0.0]# cd /u01/app/oracle/product/19.0.0/
[root@antute01 19.0.0]# ls
db_home1
tar -cvzf db_home1.tar.gz db_home1
[root@antute01 19.0.0]# ls -ll
total 3130776
drwxrwxr-x 71 oracle oinstall 4096 Aug 2 01:53 db_home1
-rw-r--r-- 1 root root 3205904235 Aug 2 02:57 db_home1.tar.gz
##二节点
cd /u01/app/19.0.0/
tar -cvzf grid.tar.gz grid/
cd /u01/app/oracle/product/19.0.0/
tar -cvzf db_home1.tar.gz db_home1
[root@antute02 19.0.0]# ls -ll
total 3125756
drwxrwxr-x 70 oracle oinstall 4096 Aug 2 01:10 db_home1
-rw-r--r-- 1 root root 3200764682 Aug 2 03:02 db_home1.tar.gz
打补丁前要注意应用补丁目录的剩余容量,如果打补丁过程中导致目录占满将发生比较麻烦的问题。补丁应用目录剩余量应大于至少30GB
##打补丁前
[oracle@antute01 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 128G 55G 67G 46% /
##打补丁后
[root@antute01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 128G 63G 59G 52% /
一节点打补丁后目录增长8G,为了安全起见打补丁前目录剩余量应该至少大于20GB以上。
##打补丁前
[oracle@antute02 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 128G 47G 75G 39% /
##打补丁后
[root@antute02 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 128G 55G 67G 45% /
二节点打补丁后目录增长8G,为了安全起见打补丁前目录剩余量应该至少大于20GB以上。
进入grid home目录备份原目录Opatch,解压最新版本Opatch(p6880880_190000_Linux)
[root@antute01 19.0.0]# cd /u01/app/19.0.0/grid/
[root@antute01 grid]# mv OPatch OPatch.bak
[root@antute01 grid]# unzip -q /soft/p6880880_190000_Linux-x86-64.zip
将OPatch包传输到二节点
[root@antute01 grid]# scp /soft/p6880880_190000_Linux-x86-64.zip antute02:/soft/19_14/
root@antute02's password:
p6880880_190000_Linux-x86-64.zip 100% 119MB 170.5MB/s 00:00
对OPatch、补丁目录赋权
补丁解压后再进行权限修改
chown -R grid:oinstall OPatch
chmod -R 775 OPatch
chown -R grid:oinstall /soft/
chmod -R 775 /soft/
ls -ll /soft/19_14
total 2697368
drwxrwxr-x 4 grid oinstall 4096 Jan 17 2022 33567274
-rwxrwxr-x 1 grid oinstall 2760607369 Aug 2 22:22 p33567274_190000_Linux-x86-64.zip
-rwxrwxr-x 1 grid oinstall 1483571 Jan 18 2022 PatchSearch.xml
操作与GI OPatch更新相同只是目录不同
cd /u01/app/oracle1/product/19/db_home1/
mv OPatch OPatch.bak
unzip -q /soft/p6880880_190000_Linux-x86-64.zip
chown -R oracle:oinstall OPatch
chmod -R 775 OPatch
[root@antute02 grid]# cd /u01/app/19.0.0/grid/
[root@antute02 grid]# mv OPatch OPatch.bak
[root@antute02 grid]# unzip -q /soft/19_14/p6880880_190000_Linux-x86-64.zip
[root@antute02 grid]# chown -R grid:oinstall OPatch
[root@antute02 grid]# chmod -R 775 OPatch
[root@antute02 grid]# chown -R grid:oinstall /soft/
[root@antute02 grid]# chmod -R 775 /soft/
[root@antute02 grid]# ls -ll /soft/19_14
total 2819604
drwxrwxr-x 4 grid oinstall 4096 Jan 17 2022 33567274
-rwxrwxr-x 1 grid oinstall 2760607369 Aug 2 22:28 p33567274_190000_Linux-x86-64.zip
-rwxrwxr-x 1 grid oinstall 125167420 Aug 2 22:41 p6880880_190000_Linux-x86-64.zip
-rwxrwxr-x 1 grid oinstall 1483571 Jan 18 2022 PatchSearch.xml
[root@antute02 grid]# cd /u01/app/oracle1/product/19/db_home1/
[root@antute02 db_home1]# mv OPatch OPatch.bak
[root@antute02 db_home1]#
[root@antute02 db_home1]# unzip -q /soft/19_14/p6880880_190000_Linux-x86-64.zip
[root@antute02 db_home1]# chown -R oracle:oinstall OPatch
[root@antute02 db_home1]# chmod -R 775 OPatch
打补丁前需要将集群所有节点的grid、oracle hom目录的Opatch升级到最新版本
[grid@antute01 ~]$ su - grid
$ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.39
[grid@antute02 ~]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.39
[oracle@antute01 ~]$ su- oracle
$ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.39
[oracle@antute02 ~]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.39
从19.19开始需要更新AHF了,AHF过期超过90天打补丁会报错,如果数据库是老库建议直接升级ahf
[root@antute02 ~]# ahfctl statusahf
.-----------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+----------+---------------+------+------+------------+----------------------+------------------+
| antute02 | RUNNING | 2806 | 5000 | 23.2.0.0.0 | 23200020230308034210 | COMPLETE |
| antute01 | RUNNING | 2728 | 5000 | 23.2.0.0.0 | 23200020230308034210 | COMPLETE |
'----------+---------------+------+------+------------+----------------------+------------------'
一节点解压安装即可,严格按照安装过程执行否则会安装不成功
[root@antute01 ~]# unzip AHF-LINUX_v23.7.0.zip -d AHF
Archive: AHF-LINUX_v23.7.0.zip
inflating: AHF/ahf_setup
extracting: AHF/ahf_setup.dat
inflating: AHF/README.txt
inflating: AHF/oracle-tfa.pub
[root@antute01 ~]# cd AHF
[root@antute01 AHF]# ls -ll
total 370524
-rwx------ 1 root root 379400352 Jul 29 05:25 ahf_setup
-rw------- 1 root root 384 Jul 29 05:26 ahf_setup.dat
-rw-r--r-- 1 root root 625 Jul 29 05:27 oracle-tfa.pub
-rw-r--r-- 1 root root 1525 Jul 29 05:27 README.txt
[root@antute01 AHF]# ./ahf_setup
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_237000_32093_2023_08_08-22_56_07.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 23.7.0 Build Date: 202307281326
AHF is already installed at /opt/oracle.ahf
Installed AHF Version: 23.2.0 Build Date: 202303080342
Do you want to upgrade AHF [Y]|N : y ##输入Y
AHF will also be installed/upgraded on these Cluster Nodes :
1. antute02
The AHF Location and AHF Data Directory must exist on the above nodes
AHF Location : /opt/oracle.ahf
AHF Data Directory : /u01/app/grid/oracle.ahf/data
Do you want to install/upgrade AHF on Cluster Nodes ? [Y]|N : y ##输入Y
Upgrading /opt/oracle.ahf
Shutting down AHF Services
Upgrading AHF Services
Beginning Retype Index
TFA Home: /opt/oracle.ahf/tfa
Moving existing indexes into temporary folder
Index file for index moved successfully
Index file for index_metadata moved successfully
Index file for complianceindex moved successfully
Moved indexes successfully
Starting AHF Services
No new directories were added to TFA
Directory /u01/app/grid/crsdata/antute01/trace/chad was already added to TFA Directories.
AHF upgrade completed on antute01
Upgrading AHF on Remote Nodes : ##回车
AHF will be installed on antute02, Please wait.
AHF will prompt twice to install/upgrade per Remote Node. So total 2 prompts
Do you want to continue Y|[N] : y
AHF will continue with Upgrading on remote nodes
Upgrading AHF on antute02 :##回车
[antute02] Copying AHF Installer
root@antute02's password: ##root密码
[antute02] Running AHF Installer
root@antute02's password: ##root密码
Do you want AHF to store your My Oracle Support Credentials for Automatic Upload ? Y|[N] : ##回车
.----------------------------------------------------------------.
| Host | TFA Version | TFA Build ID | Upgrade Status |
+----------+-------------+----------------------+----------------+
| antute01 | 23.7.0.0.0 | 23700020230728132609 | UPGRADED |
| antute02 | 23.7.0.0.0 | 23700020230728132609 | UPGRADED |
'----------+-------------+----------------------+----------------'
Setting up AHF CLI and SDK
AHF is successfully upgraded to latest version
Moving /tmp/ahf_install_237000_32093_2023_08_08-22_56_07.log to /u01/app/grid/oracle.ahf/data/antute01/diag/ahf/
[root@antute02 ~]# ahfctl statusahf
.------------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+----------+---------------+-------+------+------------+----------------------+------------------+
| antute02 | RUNNING | 42468 | 5000 | 23.7.0.0.0 | 23700020230728132609 | COMPLETE |
| antute01 | RUNNING | 39189 | 5000 | 23.7.0.0.0 | 23700020230728132609 | COMPLETE |
注意:语句逐条执行
操作:
su - grid
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35042068
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35050331
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35050325
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35107512
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/33575402
检查通过会有Prereq "checkConflictAgainstOHWithDetail" passed.的显示。从结果看出所有补丁冲突检测已通过。
注意:操作步骤与一节点一样,注意都是登录到grid用户执行,注意补丁位置及OPatch位置以免报错。
su - grid
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35042068
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35050331
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35050325
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35107512
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/33575402
su - oracle
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35042068
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35050331
su - oracle
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35042068
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/19_19//35037840/35050331
[root@antute01 35037840]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /soft/19_19/35037840/ -analyze
OPatchauto session is initiated at Thu Aug 3 21:01:57 2023
System initialization log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2023-08-03_09-02-03PM.log.
Session log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2023-08-03_09-02-55PM.log
The id for this session is BAVT
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0/grid
Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle1/product/19/db_home1
Patch applicability verified successfully on home /u01/app/oracle1/product/19/db_home1
Patch applicability verified successfully on home /u01/app/19.0.0/grid
Executing patch validation checks on home /u01/app/19.0.0/grid
Patch validation checks successfully completed on home /u01/app/19.0.0/gri
Executing patch validation checks on home /u01/app/oracle1/product/19/db_home1
Patch validation checks successfully completed on home /u01/app/oracle1/product/19/db_home1
Verifying SQL patch applicability on home /u01/app/oracle1/product/19/db_home1
SQL patch applicability verified successfully on home /u01/app/oracle1/product/19/db_home1
OPatchAuto successful.
--------------------------------Summary--------------------------------
Analysis for applying patches has completed successfully:
Host:antute01
RAC Home:/u01/app/oracle1/product/19/db_home1
Version:19.0.0.0.0
==Following patches were SKIPPED:
Patch: /soft/19_19/35037840/35050325
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft/19_19/35037840/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft/19_19/35037840/35107512
Reason: This patch is not applicable to this specified target type - "rac_database"
==Following patches were SUCCESSFULLY analyzed to be applied:
Patch: /soft/19_19/35037840/35050331
Log: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-03-20PM_1.log
Patch: /soft/19_19/35037840/35042068
Log: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-03-20PM_1.log
Host:antute01
CRS Home:/u01/app/19.0.0/grid
Version:19.0.0.0.0
==Following patches were SKIPPED:
Patch: /soft/19_19/35037840/33575402
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-03-20PM_1.log
Reason: /soft/19_19/35037840/33575402 is not required to be applied to oracle home /u01/app/19.0.0/grid
==Following patches were SUCCESSFULLY analyzed to be applied:
Patch: /soft/19_19/35037840/35050331
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-03-20PM_1.log
Patch: /soft/19_19/35037840/35050325
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-03-20PM_1.log
Patch: /soft/19_19/35037840/35107512
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-03-20PM_1.log
Patch: /soft/19_19/35037840/35042068
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-03-20PM_1.log
OPatchauto session completed at Thu Aug 3 21:05:09 2023
Time taken to complete the session 3 minutes, 7 seconds
##预检查通过没有报错
[root@antute02 19_19]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /soft/19_19/35037840/ -analyze
OPatchauto session is initiated at Thu Aug 3 21:08:48 2023
System initialization log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2023-08-03_09-08-52PM.log.
Session log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2023-08-03_09-09-09PM.log
The id for this session is XR83
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0/grid
Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle1/product/19/db_home1
Patch applicability verified successfully on home /u01/app/oracle1/product/19/db_home1
Patch applicability verified successfully on home /u01/app/19.0.0/grid
Executing patch validation checks on home /u01/app/19.0.0/grid
Patch validation checks successfully completed on home /u01/app/19.0.0/grid
Executing patch validation checks on home /u01/app/oracle1/product/19/db_home1
Patch validation checks successfully completed on home /u01/app/oracle1/product/19/db_home1
Verifying SQL patch applicability on home /u01/app/oracle1/product/19/db_home1
SQL patch applicability verified successfully on home /u01/app/oracle1/product/19/db_home1
OPatchAuto successful.
--------------------------------Summary--------------------------------
Analysis for applying patches has completed successfully:
st:antute02
RAC Home:/u01/app/oracle1/product/19/db_home1
Version:19.0.0.0.0
==Following patches were SKIPPED:
Patch: /soft/19_19/35037840/35050325
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft/19_19/35037840/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft/19_19/35037840/35107512
Reason: This patch is not applicable to this specified target type - "rac_database"
==Following patches were SUCCESSFULLY analyzed to be applied:
Patch: /soft/19_19/35037840/35050331
Log: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-09-31PM_1.log
Patch: /soft/19_19/35037840/35042068
Log: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-09-31PM_1.log
Host:antute02
CRS Home:/u01/app/19.0.0/grid
Version:19.0.0.0.0
==Following patches were SKIPPED:
Patch: /soft/19_19/35037840/33575402
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-09-31PM_1.log
Reason: /soft/19_19/35037840/33575402 is not required to be applied to oracle home /u01/app/19.0.0/grid
==Following patches were SUCCESSFULLY analyzed to be applied:
Patch: /soft/19_19/35037840/35050331
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-09-31PM_1.log
Patch: /soft/19_19/35037840/35050325
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-09-31PM_1.log
Patch: /soft/19_19/35037840/35107512
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-09-31PM_1.log
Patch: /soft/19_19/35037840/35042068
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-09-31PM_1.log
OPatchauto session completed at Thu Aug 3 21:11:12 2023
Time taken to complete the session 2 minutes, 20 seconds
crsctl stat res -t
检查补丁目录的属组是否是grid:oinstall,权限是否是775,如果属组权限没有覆盖补丁目录需要重新授权。
##检查补丁权限属组
[root@antute01 ~]# cd /soft/
[root@antute01 soft]# ls -ll
total 5931720
drwxrwxr-x 3 grid oinstall 4096 Aug 2 22:33 19_14
drwxrwxr-x 3 grid oinstall 4096 Aug 2 19:15 19_19
-rwxrwxr-x 1 grid oinstall 3059705302 Jun 1 16:35 LINUX.X64_193000_db_home.zip
-rwxrwxr-x 1 grid oinstall 2889184573 Jun 1 16:35 LINUX.X64_193000_grid_home.zip
[root@antute01 soft]# cd 19_14/
[root@antute01 19_14]# ls -ll
total 2697368
drwxrwxr-x 4 grid oinstall 4096 Jan 17 2022 33567274
-rwxrwxr-x 1 grid oinstall 2760607369 Aug 2 22:22 p33567274_190000_Linux-x86-64 .zip
-rwxrwxr-x 1 grid oinstall 1483571 Jan 18 2022 PatchSearch.xml
[root@antute01 19_14]# cd 33567274/
[root@antute01 33567274]# ls -ll
total 40
drwxrwxr-x 8 grid oinstall 4096 Jan 14 2022 33509923
drwxrwxr-x 4 grid oinstall 4096 Jan 6 2022 33561310
-rwxrwxr-x 1 grid oinstall 7817 Jan 16 2022 PatchSearch.xml
-rwxrwxr-x 1 grid oinstall 22585 Jan 17 2022 README.html
[root@antute01 33567274]# cd 33509923/
[root@antute01 33509923]# ls -ll
total 156
drwxrwxr-x 4 grid oinstall 4096 Jan 14 2022 33239955
drwxrwxr-x 5 grid oinstall 4096 Jan 14 2022 33515361
drwxrwxr-x 5 grid oinstall 4096 Jan 14 2022 33529556
drwxrwxr-x 5 grid oinstall 4096 Jan 14 2022 33534448
drwxrwxr-x 4 grid oinstall 4096 Jan 14 2022 33575402
drwxrwxr-x 2 grid oinstall 4096 Jan 14 2022 automation
-rwxrwxr-x 1 grid oinstall 5824 Jan 13 2022 bundle.xml
-rwxrwxr-x 1 grid oinstall 123797 Jan 17 2022 README.html
-rwxrwxr-x 1 grid oinstall 0 Jan 14 2022 README.txt
[root@antute01 19_19]# export PATH=$PATH:/u01/app/19.0.0/grid/OPatch
[root@antute01 19_19]# opatchauto apply /soft/19_19/35037840/ -oh /u01/app/19.0.0/grid
OPatchauto session is initiated at Thu Aug 3 21:15:46 2023
System initialization log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2023-08-03_09-15-51PM.log.
Session log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2023-08-03_09-16-01PM.log
The id for this session is ICXQ
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0/grid
Patch applicability verified successfully on home /u01/app/19.0.0/grid
Executing patch validation checks on home /u01/app/19.0.0/grid
Patch validation checks successfully completed on home /u01/app/19.0.0/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.0.0/grid
Prepatch operation log file location: /u01/app/grid/crsdata/antute01/crsconfig/crs_prepatch_apply_inplace_antute01_2023-08-03_09-17-12PM.log
CRS service brought down successfully on home /u01/app/19.0.0/grid
Start applying binary patch on home /u01/app/19.0.0/grid
Failed while applying binary patches on home /u01/app/19.0.0/grid
Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:
Patch Target : antute01->/u01/app/19.0.0/grid Type[crs]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: /u01/app/19.0.0/grid, host: antute01.
Command failed: /u01/app/19.0.0/grid/OPatch/opatchauto apply /soft/19_19/35037840/ -oh /u01/app/19.0.0/grid -target_type cluster -binary -invPtrLoc /u01/app/19.0.0/grid/oraInst.loc -jre /u01/app/19.0.0/grid/OPatch/jre -persistresult /u01/app/19.0.0/grid/opatchautocfg/db/sessioninfo/sessionresult_antute01_crs_1.ser -analyzedresult /u01/app/19.0.0/grid/opatchautocfg/db/sessioninfo/sessionresult_analyze_antute01_crs_1.ser
Command failure output:
==Following patches FAILED in apply:
Patch: /soft/19_19/35037840/35042068
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-19-58PM_1.log
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Patch: /soft/19_19/35037840/35050325
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-19-58PM_1.log
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Patch: /soft/19_19/35037840/35050331
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-19-58PM_1.log
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Patch: /soft/19_19/35037840/35107512
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-19-58PM_1.log
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
After fixing the cause of failure Run opatchauto resume
]
OPATCHAUTO-68061: The orchestration engine failed.
OPATCHAUTO-68061: The orchestration engine failed with return code 1
OPATCHAUTO-68061: Check the log for more details.
OPatchAuto failed.
OPatchauto session completed at Thu Aug 3 21:20:41 2023
Time taken to complete the session 4 minutes, 50 seconds
出现报错这里不要慌按照下面步骤处理报错,此时窗口不要关闭另起窗口排查问题。该窗口在问题处理后还要继续应用补丁。
在安装过程进行到4分50秒的时候出现了报错,
报错内容主要包括:Prerequisite check "CheckActiveFilesAndExecutables" failed.
该报错主要只在打补丁的过程中检测到相关活动的进程,导致需要静态安装的程序步骤无法正常进行。
根据报错的问题去排查当前是否存在grid相关的活动进程:
##查看grid相关进程
[root@antute01 19_19]# ps -ef|grep grid
root 39088 115627 0 21:17 pts/4 00:00:00 tail -f /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2023-08-03_09-16-01PM.log
grid 55950 1 0 19:24 ? 00:00:14 /u01/app/19.0.0/grid/jdk/bin/java -server -Xms128M -Xmx512M -Djava.awt.headless=true -Ddisable.checkForUpdate=true -Djava.util.logging.config.file=/u01/app/grid/crsdata/antute01/qos/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -DTRACING.ENABLED=false -Djava.rmi.server.hostname=antute01 -Doracle.http.port=8888 -Doracle.jmx.port=8895 -Doracle.tls.enabled=false -Doracle.jwc.tls.http.enabled=false -Djava.security.manager -Djava.security.policy=/u01/app/grid/crsdata/antute01/qos/conf/catalina.policy -Djava.security.egd=file:/dev/urandom -XX:ParallelGCThreads=2 -Dcatalina.home=/u01/app/19.0.0/grid/tomcat -Dcatalina.base=/u01/app/grid/crsdata/antute01/qos -Djava.io.tmpdir=/u01/app/grid/crsdata/antute01/qos/temp -Doracle.home=/u01/app/19.0.0/grid -Doracle.jwc.mode=CLUSTERWARE -classpath /u01/app/19.0.0/grid/jlib/cryptoj.jar:/u01/app/19.0.0/grid/jlib/oraclepki.jar:/u01/app/19.0.0/grid/jlib/osdt_core.jar:/u01/app/19.0.0/grid/jlib/osdt_cert.jar:/u01/app/19.0.0/grid/tomcat/lib/tomcat-juli.jar:/u01/app/19.0.0/grid/tomcat/lib/bootstrap.jar:/u01/app/19.0.0/grid/jlib/jwc-logging.jar org.apache.catalina.startup.Bootstrap start
grid 58208 84874 0 21:29 ? 00:00:00 sleep 60
grid 58314 83190 0 21:29 ? 00:00:00 sleep 30
root 58396 115709 0 21:29 pts/5 00:00:00 grep --color=auto grid
grid 83190 1 0 15:09 ? 00:00:04 /bin/sh ./OSWatcher.sh 30 48 /bin/gzip /u01/app/grid/oracle.ahf/data/repository/suptools/antute01/oswbb/grid/archive
grid 84874 83190 0 15:09 ? 00:00:01 /bin/sh ./OSWatcherFM.sh 48 /u01/app/grid/oracle.ahf/data/repository/suptools/antute01/oswbb/grid/archive
##发现55950进程杀掉该进程
[root@antute01 19_19]# kill -9 55950
##继续查看是否存在存活的进程
OSWatcher相关进程不影响补丁安装可以排除
[root@antute01 19_19]# ps -ef|grep grid
root 39088 115627 0 21:17 pts/4 00:00:00 tail -f /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2023-08-03_09-16-01PM.log
grid 59727 84874 0 21:32 ? 00:00:00 sleep 60
grid 60063 83190 0 21:32 ? 00:00:00 sleep 30
root 60161 115709 0 21:33 pts/5 00:00:00 grep --color=auto grid
grid 83190 1 0 15:09 ? 00:00:05 /bin/sh ./OSWatcher.sh 30 48 /bin/gzip /u01/app/grid/oracle.ahf/data/repository/suptools/antute01/oswbb/grid/archive
grid 84874 83190 0 15:09 ? 00:00:01 /bin/sh ./OSWatcherFM.sh 48 /u01/app/grid/oracle.ahf/data/repository/suptools/antute01/oswbb/grid/archive
[root@antute01 19_19]# opatchauto resume
Session log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2023-08-03_09-35-16PM.log
Resuming existing session with id ICXQ
Start applying binary patch on home /u01/app/19.0.0/grid
Binary patch applied successfully on home /u01/app/19.0.0/grid
Checking shared status of home.....
Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.0.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/antute01/crsconfig/crs_postpatch_apply_inplace_antute01_2023-08-03_09-40-20PM.log
CRS service started successfully on home /u01/app/19.0.0/grid
OPatchAuto successful. --自动应用补丁成功
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:antute01
CRS Home:/u01/app/19.0.0/grid
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /soft/19_19/35037840/33575402
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-16-22PM_1.log
Reason: /soft/19_19/35037840/33575402 is not required to be applied to oracle home /u01/app/19.0.0/grid
==Following patches were SUCCESSFULLY applied:
Patch: /soft/19_19/35037840/35042068
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-35-35PM_1.log
Patch: /soft/19_19/35037840/35050325
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-35-35PM_1.log
Patch: /soft/19_19/35037840/35050331
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-35-35PM_1.log
Patch: /soft/19_19/35037840/35107512
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-35-35PM_1.log
OPatchauto session completed at Thu Aug 3 21:44:55 2023
Time taken to complete the session 9 minutes, 40 seconds
[root@antute01 19_19]# su - grid
Last login: Thu Aug 3 21:44:18 CST 2023
[grid@antute01 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
35107512;TOMCAT RELEASE UPDATE 19.0.0.0.0 (35107512)
35050331;OCW RELEASE UPDATE 19.19.0.0.0 (35050331)
35050325;ACFS RELEASE UPDATE 19.19.0.0.0 (35050325)
35042068;Database Release Update : 19.19.0.0.230418 (35042068)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)
OPatch succeeded.
##检查补丁权限属组
[root@antute01 ~]# cd /soft/
[root@antute01 soft]# ls -ll
total 5931720
drwxrwxr-x 3 grid oinstall 4096 Aug 2 22:33 19_14
drwxrwxr-x 3 grid oinstall 4096 Aug 2 19:15 19_19
-rwxrwxr-x 1 grid oinstall 3059705302 Jun 1 16:35 LINUX.X64_193000_db_home.zip
-rwxrwxr-x 1 grid oinstall 2889184573 Jun 1 16:35 LINUX.X64_193000_grid_home.zip
[root@antute01 soft]# cd 19_14/
[root@antute01 19_14]# ls -ll
total 2697368
drwxrwxr-x 4 grid oinstall 4096 Jan 17 2022 33567274
-rwxrwxr-x 1 grid oinstall 2760607369 Aug 2 22:22 p33567274_190000_Linux-x86-64 .zip
-rwxrwxr-x 1 grid oinstall 1483571 Jan 18 2022 PatchSearch.xml
[root@antute01 19_14]# cd 33567274/
[root@antute01 33567274]# ls -ll
total 40
drwxrwxr-x 8 grid oinstall 4096 Jan 14 2022 33509923
drwxrwxr-x 4 grid oinstall 4096 Jan 6 2022 33561310
-rwxrwxr-x 1 grid oinstall 7817 Jan 16 2022 PatchSearch.xml
-rwxrwxr-x 1 grid oinstall 22585 Jan 17 2022 README.html
[root@antute01 33567274]# cd 33509923/
[root@antute01 33509923]# ls -ll
total 156
drwxrwxr-x 4 grid oinstall 4096 Jan 14 2022 33239955
drwxrwxr-x 5 grid oinstall 4096 Jan 14 2022 33515361
drwxrwxr-x 5 grid oinstall 4096 Jan 14 2022 33529556
drwxrwxr-x 5 grid oinstall 4096 Jan 14 2022 33534448
drwxrwxr-x 4 grid oinstall 4096 Jan 14 2022 33575402
drwxrwxr-x 2 grid oinstall 4096 Jan 14 2022 automation
-rwxrwxr-x 1 grid oinstall 5824 Jan 13 2022 bundle.xml
-rwxrwxr-x 1 grid oinstall 123797 Jan 17 2022 README.html
-rwxrwxr-x 1 grid oinstall 0 Jan 14 2022 README.txt
[root@antute02 19_19]# export PATH=$PATH:/u01/app/19.0.0/grid/OPatch
[root@antute02 19_19]# opatchauto apply /soft/19_19/35037840/ -oh /u01/app/19.0.0/grid
OPatchauto session is initiated at Thu Aug 3 21:48:52 2023
System initialization log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2023-08-03_09-48-59PM.log.
Session log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2023-08-03_09-49-11PM.log
The id for this session is TDAE
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0/grid
Patch applicability verified successfully on home /u01/app/19.0.0/grid
Executing patch validation checks on home /u01/app/19.0.0/grid
Patch validation checks successfully completed on home /u01/app/19.0.0/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.0.0/grid
Prepatch operation log file location: /u01/app/grid/crsdata/antute02/crsconfig/crs_prepatch_apply_inplace_antute02_2023-08-03_09-50-23PM.log
CRS service brought down successfully on home /u01/app/19.0.0/grid
Start applying binary patch on home /u01/app/19.0.0/grid
Binary patch applied successfully on home /u01/app/19.0.0/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.0.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/antute02/crsconfig/crs_postpatch_apply_inplace_antute02_2023-08-03_09-57-34PM.log
CRS service started successfully on home /u01/app/19.0.0/grid
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:antute02
CRS Home:/u01/app/19.0.0/grid
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /soft/19_19/35037840/33575402
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-49-31PM_1.log
Reason: /soft/19_19/35037840/33575402 is not required to be applied to oracle home /u01/app/19.0.0/grid
==Following patches were SUCCESSFULLY applied:
Patch: /soft/19_19/35037840/35042068
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-52-57PM_1.log
Patch: /soft/19_19/35037840/35050325
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-52-57PM_1.log
Patch: /soft/19_19/35037840/35050331
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-52-57PM_1.log
Patch: /soft/19_19/35037840/35107512
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_21-52-57PM_1.log
OPatchauto session completed at Thu Aug 3 22:03:08 2023
Time taken to complete the session 14 minutes, 9 seconds
[root@antute02 19_19]# su - grid
Last login: Thu Aug 3 22:03:06 CST 2023
[grid@antute02 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
35107512;TOMCAT RELEASE UPDATE 19.0.0.0.0 (35107512)
35050331;OCW RELEASE UPDATE 19.19.0.0.0 (35050331)
35050325;ACFS RELEASE UPDATE 19.19.0.0.0 (35050325)
35042068;Database Release Update : 19.19.0.0.230418 (35042068)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)
注意:oracle应用补丁的操作与GI不同,是用oracle_home下的OPatch进行补丁安装到oracle_home下的补丁集的位置不变!
[root@antute01 19_19]# /u01/app/oracle1/product/19/db_home1/OPatch/opatchauto apply /soft/19_19/35037840/ -oh /u01/app/oracle1/product/19/db_home1
OPatchauto session is initiated at Thu Aug 3 22:06:32 2023
System initialization log file is /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchautodb/systemconfig2023-08-03_10-06-38PM.log.
Session log file is /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/opatchauto2023-08-03_10-06-58PM.log
The id for this session is XID1
Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle1/product/19/db_home1
Patch applicability verified successfully on home /u01/app/oracle1/product/19/db_home1
Executing patch validation checks on home /u01/app/oracle1/product/19/db_home1
Patch validation checks successfully completed on home /u01/app/oracle1/product/19/db_home1
Verifying SQL patch applicability on home /u01/app/oracle1/product/19/db_home1
SQL patch applicability verified successfully on home /u01/app/oracle1/product/19/db_home1
Preparing to bring down database service on home /u01/app/oracle1/product/19/db_home1
Successfully prepared home /u01/app/oracle1/product/19/db_home1 to bring down database service
Bringing down database service on home /u01/app/oracle1/product/19/db_home1
Following database(s) and/or service(s) are stopped and will be restarted later during the session: att
Database service successfully brought down on home /u01/app/oracle1/product/19/db_home1
Performing prepatch operation on home /u01/app/oracle1/product/19/db_home1
Prepatch operation completed successfully on home /u01/app/oracle1/product/19/db_home1
Start applying binary patch on home /u01/app/oracle1/product/19/db_home1
Binary patch applied successfully on home /u01/app/oracle1/product/19/db_home1
Performing postpatch operation on home /u01/app/oracle1/product/19/db_home1
Postpatch operation completed successfully on home /u01/app/oracle1/product/19/db_home1
Starting database service on home /u01/app/oracle1/product/19/db_home1
Database service successfully started on home /u01/app/oracle1/product/19/db_home1
Preparing home /u01/app/oracle1/product/19/db_home1 after database service restarted
No step execution required.........
Trying to apply SQL patch on home /u01/app/oracle1/product/19/db_home1
No SQL patch operations are required on local node for this home
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:antute01
RAC Home:/u01/app/oracle1/product/19/db_home1
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /soft/19_19/35037840/35050325
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft/19_19/35037840/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft/19_19/35037840/35107512
Reason: This patch is not applicable to this specified target type - "rac_database"
==Following patches were SUCCESSFULLY applied:
Patch: /soft/19_19/35037840/35042068
Log: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_22-09-18PM_1.log
Patch: /soft/19_19/35037840/35050331
Log: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_22-09-18PM_1.log
OPatchauto session completed at Thu Aug 3 22:13:57 2023
Time taken to complete the session 7 minutes, 19 seconds
[oracle@antute01 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
35050331;OCW RELEASE UPDATE 19.19.0.0.0 (35050331)
35042068;Database Release Update : 19.19.0.0.230418 (35042068)
33561310;OJVM RELEASE UPDATE: 19.14.0.0.220118 (33561310)
OPatch succeeded.
注意:oracle应用补丁的操作与GI不同,是用oracle_home下的OPatch进行补丁安装到oracle_home下的补丁集的位置不变!
/u01/app/oracle1/product/19/db_home1/OPatch/opatchauto apply /soft/19_19/35037840/ -oh /u01/app/oracle1/product/19/db_home1
[root@antute02 19_19]# /u01/app/oracle1/product/19/db_home1/OPatch/opatchauto apply /soft/19_19/35037840/ -oh /u01/app/oracle1/product/19/db_home1
OPatchauto session is initiated at Thu Aug 3 22:17:19 2023
System initialization log file is /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchautodb/systemconfig2023-08-03_10-17-26PM.log.
Session log file is /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/opatchauto2023-08-03_10-17-44PM.log
The id for this session is 171P
Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle1/product/19/db_home1
Patch applicability verified successfully on home /u01/app/oracle1/product/19/db_home1
Executing patch validation checks on home /u01/app/oracle1/product/19/db_home1
Patch validation checks successfully completed on home /u01/app/oracle1/product/19/db_home1
Verifying SQL patch applicability on home /u01/app/oracle1/product/19/db_home1
SQL patch applicability verified successfully on home /u01/app/oracle1/product/19/db_home1
Preparing to bring down database service on home /u01/app/oracle1/product/19/db_home1
Successfully prepared home /u01/app/oracle1/product/19/db_home1 to bring down database service
Bringing down database service on home /u01/app/oracle1/product/19/db_home1
Following database(s) and/or service(s) are stopped and will be restarted later during the session: att
Database service successfully brought down on home /u01/app/oracle1/product/19/db_home1
Performing prepatch operation on home /u01/app/oracle1/product/19/db_home1
Prepatch operation completed successfully on home /u01/app/oracle1/product/19/db_home1
Start applying binary patch on home /u01/app/oracle1/product/19/db_home1
Binary patch applied successfully on home /u01/app/oracle1/product/19/db_home1
Performing postpatch operation on home /u01/app/oracle1/product/19/db_home1
Postpatch operation completed successfully on home /u01/app/oracle1/product/19/db_home1
Starting database service on home /u01/app/oracle1/product/19/db_home1
Database service successfully started on home /u01/app/oracle1/product/19/db_home1
Preparing home /u01/app/oracle1/product/19/db_home1 after database service restarted
No step execution required.........
Trying to apply SQL patch on home /u01/app/oracle1/product/19/db_home1
SQL patch applied successfully on home /u01/app/oracle1/product/19/db_home1
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:antute02
RAC Home:/u01/app/oracle1/product/19/db_home1
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /soft/19_19/35037840/35050325
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft/19_19/35037840/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft/19_19/35037840/35107512
Reason: This patch is not applicable to this specified target type - "rac_database"
==Following patches were SUCCESSFULLY applied:
Patch: /soft/19_19/35037840/35042068
Log: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_22-20-05PM_1.log
Patch: /soft/19_19/35037840/35050331
Log: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatchauto/core/opatch/opatch2023-08-03_22-20-05PM_1.log
OPatchauto session completed at Thu Aug 3 22:34:41 2023
Time taken to complete the session 17 minutes, 15 seconds
[oracle@antute02 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
35050331;OCW RELEASE UPDATE 19.19.0.0.0 (35050331)
35042068;Database Release Update : 19.19.0.0.230418 (35042068)
33561310;OJVM RELEASE UPDATE: 19.14.0.0.220118 (33561310)
OPatch succeeded.
注意:应用OVJM补丁前需要停止集群服务及所有数据库服务
root用户下执行crsctl stop crs
[root@antute01 19_19]# crsctl stop crs
[root@antute02 19_19]# crsctl stop crs
检查集群数据库进程是否全部停止
注意:解压补丁后需要输入Y替换之前的PatchSearch.xml
--解压OVJM补丁
[root@antute01 ~]# cd /soft/19_19/
[root@antute01 19_19]# ls -ll
total 2914656
drwxrwxr-x 8 grid oinstall 4096 Apr 7 16:38 35037840
-rwxrwxr-x 1 grid oinstall 2855198419 Jul 20 16:52 p35037840_190000_Linux-x86-64.zip
-rwxrwxr-x 1 oracle oinstall 127295167 Jul 20 16:52 p35050341_190000_Linux-x86-64.zip
-rwxrwxr-x 1 grid oinstall 2102706 Apr 18 19:46 PatchSearch.xml
[root@antute01 19_19]# unzip p35050341_190000_Linux-x86-64.zip
replace PatchSearch.xml? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: PatchSearch.xml
给权限
[root@antute01 19_19]# chown -R oracle:oinstall 35050341/
[root@antute01 19_19]# chmod -R 775 35050341/
[root@antute01 19_19]#
[oracle@antute01 ~]$ cd /soft/19_19/35050341/
[oracle@antute01 35050341]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2023, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle1/product/19/db_home1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle1/product/19/db_home1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatch/opatch2023-08-04_09-19-09AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
注意:使用oracle用户
cd /soft/19_19/35050341/
[oracle@antute01 35050341]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2023, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle1/product/19/db_home1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle1/product/19/db_home1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatch/opatch2023-08-04_09-27-25AM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 35050341
Do you want to proceed? [y|n]
y
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/oracle1/product/19/db_home1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '35050341' to OH '/u01/app/oracle1/product/19/db_home1'
Patching component oracle.javavm.server, 19.0.0.0.0...
Patching component oracle.javavm.server.core, 19.0.0.0.0...
Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
Patching component oracle.rdbms, 19.0.0.0.0...
Patching component oracle.javavm.client, 19.0.0.0.0...
Patch 35050341 successfully applied.
Sub-set patch [33561310] has become inactive due to the application of a super-set patch [35050341].由于应用了超集补丁[3503041],子集补丁[3351310]已变为非活动补丁。
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatch/opatch2023-08-04_09-27-25AM_1.log
OPatch succeeded.
[root@antute01 19_19]# su - oracle
Last login: Thu Aug 3 22:49:07 CST 2023
[oracle@antute01 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
35050331;OCW RELEASE UPDATE 19.19.0.0.0 (35050331)
35042068;Database Release Update : 19.19.0.0.230418 (35042068)
33561310;OJVM RELEASE UPDATE: 19.14.0.0.220118 (33561310)
[oracle@antute01 35050341]$ $ORACLE_HOME/OPatch/opatch lspatches
35050341;OJVM RELEASE UPDATE: 19.19.0.0.230418 (35050341)
35050331;OCW RELEASE UPDATE 19.19.0.0.0 (35050331)
35042068;Database Release Update : 19.19.0.0.230418 (35042068)
OPatch succeeded.
可以看到OVJM从19.14变成了19.19
操作与一节点一样
--解压OVJM补丁
[root@antute02 ~]# cd /soft/19_19
[root@antute02 19_19]# ls -ll
[root@antute02 19_19]# unzip p35050341_190000_Linux-x86-64.zip
replace PatchSearch.xml? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: PatchSearch.xml
[root@antute02 19_19]# ls -ll
total 2912616
drwxrwxr-x 8 grid oinstall 4096 Apr 7 16:38 35037840
drwxr-xr-x 4 root root 4096 Mar 17 19:11 35050341
-rwxrwxr-x 1 grid oinstall 2855198419 Aug 2 19:19 p35037840_190000_Linux-x86-64.zip
-rwxr-xr-x 1 oracle oinstall 127295167 Aug 3 20:42 p35050341_190000_Linux-x86-64.zip
-rw-rw-r-- 1 root root 10836 Jun 15 20:23 PatchSearch.xml
[root@antute02 19_19]# chown -R oracle:oinstall 35050341/
[root@antute02 19_19]# chmod -R 775 35050341/
[root@antute02 19_19]# ls -ll
total 2912616
drwxrwxr-x 8 grid oinstall 4096 Apr 7 16:38 35037840
drwxrwxr-x 4 oracle oinstall 4096 Mar 17 19:11 35050341
-rwxrwxr-x 1 grid oinstall 2855198419 Aug 2 19:19 p35037840_190000_Linux-x86-64.zip
-rwxr-xr-x 1 oracle oinstall 127295167 Aug 3 20:42 p35050341_190000_Linux-x86-64.zip
-rw-rw-r-- 1 root root 10836 Jun 15 20:23 PatchSearch.xml
[root@antute02 19_19]# su - oracle
Last login: Fri Aug 4 09:21:04 CST 2023
[oracle@antute02 ~]$ cd /soft/19_19/35050341/
[oracle@antute02 35050341]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2023, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle1/product/19/db_home1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle1/product/19/db_home1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatch/opatch2023-08-04_09-22-40AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
注意:使用oracle用户
cd /soft/19_19/35050341/
[oracle@antute02 35050341]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.39
Copyright (c) 2023, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle1/product/19/db_home1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle1/product/19/db_home1/oraInst.loc
OPatch version : 12.2.0.1.39
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatch/opatch2023-08-04_09-36-11AM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 35050341
Do you want to proceed? [y|n]
y
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/oracle1/product/19/db_home1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '35050341' to OH '/u01/app/oracle1/product/19/db_home1'
Patching component oracle.javavm.server, 19.0.0.0.0...
Patching component oracle.javavm.server.core, 19.0.0.0.0...
Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
Patching component oracle.rdbms, 19.0.0.0.0...
Patching component oracle.javavm.client, 19.0.0.0.0...
Patch 35050341 successfully applied.
Sub-set patch [33561310] has become inactive due to the application of a super-set patch [35050341].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle1/product/19/db_home1/cfgtoollogs/opatch/opatch2023-08-04_09-36-11AM_1.log
OPatch succeeded.
[oracle@antute02 35050341]$ $ORACLE_HOME/OPatch/opatch lspatches
35050341;OJVM RELEASE UPDATE: 19.19.0.0.230418 (35050341)
35050331;OCW RELEASE UPDATE 19.19.0.0.0 (35050331)
35042068;Database Release Update : 19.19.0.0.230418 (35042068)
OPatch succeeded.
注意:所有操作仅在一节点执行即可
[root@antute01 ~]# crsctl start crs
[root@antute02 ~]# crsctl start crs
注册补丁在一节点进行
[oracle@antute01 35050341]$ cd $ORACLE_HOME/OPatch
[oracle@antute01 OPatch]$ ./datapatch -verbose
SQL Patching tool version 19.19.0.0.0 Production on Fri Aug 4 09:46:26 2023
Copyright (c) 2012, 2023, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle1/cfgtoollogs/sqlpatch/sqlpatch_60745_2023_08_04_09_46_26/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
Interim patch 33561310 (OJVM RELEASE UPDATE: 19.14.0.0.220118 (33561310)):
Binary registry: Not installed
SQL registry: Applied successfully on 03-AUG-23 12.52.16.761085 PM
Interim patch 35050341 (OJVM RELEASE UPDATE: 19.19.0.0.230418 (35050341)):
Binary registry: Installed
SQL registry: Not installed
Current state of release update SQL patches:
Binary registry:
19.19.0.0.0 Release_Update 230322020406: Installed
SQL registry:
Applied 19.19.0.0.0 Release_Update 230322020406 successfully on 03-AUG-23 10.34.40.048486 PM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
The following interim patches will be rolled back:
33561310 (OJVM RELEASE UPDATE: 19.14.0.0.220118 (33561310))
No release update patches need to be installed
The following interim patches will be applied:
35050341 (OJVM RELEASE UPDATE: 19.19.0.0.230418 (35050341))
Installing patches...
Patch installation complete. Total patches installed: 2
Validating logfiles...done
Patch 33561310 rollback: SUCCESS
logfile: /u01/app/oracle1/cfgtoollogs/sqlpatch/33561310/24538862/33561310_rollback_ATT_2023Aug04_09_47_06.log (no errors)
Patch 35050341 apply: SUCCESS
logfile: /u01/app/oracle1/cfgtoollogs/sqlpatch/35050341/25148755/35050341_apply_ATT_2023Aug04_09_47_06.log (no errors)
SQL Patching tool complete on Fri Aug 4 09:47:29 2023
[oracle@antute01 OPatch]$ cd $ORACLE_HOME/rdbms/admin
[oracle@antute01 admin]$ sqlplus /nolog
SQL> CONNECT / AS SYSDBA
Connected.
SQL> @utlrp.sql
......
ERRORS DURING RECOMPILATION
---------------------------
Function created.
PL/SQL procedure successfully completed.
Function dropped.
PL/SQL procedure successfully completed.
SQL>
crsctl stat res -t
[oracle@antute01 admin]$ sqlplus / as sysdba
set linesize 800
col ACTION for a15
col ACTION_TIME for a30
col COMMENTS for a100
col VERSION for a40
select action_time,action,version,comments from dba_registry_history;
ACTION_TIME ACTION VERSION COMMENTS
------------------------------ --------------- ---------------------------------------- ----------------------------------------------------------------------------------------------------
BOOTSTRAP 19 RDBMS_19.19.0.0.0DBRU_LINUX.X64_230321.1
03-JUN-23 07.55.20.768366 PM RU_APPLY 19.0.0.0.0 Patch applied on 19.3.0.0.0: Release_Update - 190410122720
03-AUG-23 11.46.57.400611 AM RU_APPLY 19.0.0.0.0 Patch applied from 19.3.0.0.0 to 19.14.0.0.0: Release_Update - 211225122123
03-AUG-23 12.52.16.620442 PM jvmpsu.sql 19.14.0.0.220118OJVMRU RAN jvmpsu.sql
03-AUG-23 12.52.16.626285 PM APPLY 19.14.0.0.220118OJVMRU OJVM RU post-install
03-AUG-23 10.34.23.718815 PM RU_APPLY 19.0.0.0.0 Patch applied from 19.14.0.0.0 to 19.19.0.0.0: Release_Update - 230322020406
04-AUG-23 09.47.06.771088 AM jvmpsu.sql 19.19.0.0.230418OJVMRU RAN jvmpsu.sql
04-AUG-23 09.47.06.780121 AM ROLLBACK 19.19.0.0.230418OJVMRU OJVM RU post-deinstall
04-AUG-23 09.47.06.869404 AM jvmpsu.sql 19.19.0.0.230418OJVMRU RAN jvmpsu.sql
04-AUG-23 09.47.06.875313 AM APPLY 19.19.0.0.230418OJVMRU OJVM RU post-install
col action for a15
col status for a15
select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch;
PATCH_ID PATCH_TYPE ACTION STATUS TARGET_VERSION
---------- ---------- --------------- ---------- ---------------
29517242 RU APPLY SUCCESS 19.3.0.0.0
33515361 RU APPLY SUCCESS 19.14.0.0.0
33561310 INTERIM APPLY SUCCESS 19.14.0.0.0
35042068 RU APPLY SUCCESS 19.19.0.0.0
33561310 INTERIM ROLLBACK SUCCESS 19.19.0.0.0
35050341 INTERIM APPLY SUCCESS 19.19.0.0.0
[oracle@antute01 admin]$ $ORACLE_HOME/OPatch/opatch lsinventory
[oracle@antute02 35050341]$ $ORACLE_HOME/OPatch/opatch lsinventory
对比readme查看GI补丁集应用情况
[root@antute02 19_19]# su - grid
Last login: Fri Aug 4 10:16:19 CST 2023
[grid@antute02 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory
[root@antute01 19_19]# su - grid
[grid@antute01 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory