1) 权限修改
$ ls -lrt /u01/app/oraInventory/ContentsXML/oui-patch.xml-rw-r----- grid oinstall Aug : /u01/app/oraInventory/ContentsXML/oui-patch.xml
$ chmod 777 /u01/app/oraInventory/ContentsXML/oui-patch.xml
2)直接打补丁,报错后回滚
节点1操作
#/u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto apply /u01/soft/31326451 -oh /u01/app/oracle/product/19.0.0/db_1
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.
查询日志
[Aug 12, 2020 4:04:19 PM] [INFO] Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following active executables are not used by opatch process :
Following active executables are used by opatch process :
/u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1
/u01/app/oracle/product/19.0.0/db_1/lib/libsqlplus.so
[Aug 12, 2020 4:04:19 PM] [INFO] UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[Aug 12, 2020 4:04:19 PM] [SEVERE] OUI-67073:UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
#/u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto rollback /u01/soft/31326451 -oh /u01/app/oracle/product/19.0.0/db_1
3)停CRS 及TFA
# /u01/app/19.0.0/grid/bin/crsctl stop crs
$ /u01/app/19.0.0/grid/bin/tfactl status
.----------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+--------+---------------+-------+------+------------+----------------------+------------------+
| w1 | RUNNING | 30174 | 5000 | 20.1.3.0.0 | 201300202004291616 | COMPLETE |
| w2 | RUNNING | 55888 | 5000 | 20.1.3.0.0 | 201300202004291616 | COMPLETE |
'--------+---------------+-------+------+------------+----------------------+------------------'
# /u01/app/19.0.0/grid/bin/tfactl stop
Stopping TFA from the Command Line
Stopped OSWatcher
Nothing to do !
Killing TFA running with pid 30174
. . .
Successfully stopped TFA..
4)根据报错指定的文件,通过fuser 找到对应的进程,kill
# fuser /u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1
/u01/app/oracle/product/19.0.0/db_1/lib/libclntsh.so.19.1: 9912m
# ps -ef|grep 9912 |grep -v grep
oracle 9912 5796 0 14:57 pts/3 00:00:00 sqlplus as sysdba
# fuser /u01/app/oracle/product/19.0.0/db_1/lib/libsqlplus.so
/u01/app/oracle/product/19.0.0/db_1/lib/libsqlplus.so: 9912m
# kill -9 9912
5)补丁安装
#/u01/app/oracle/product/19.0.0/db_1/OPatch/opatchauto apply /u01/soft/31326451 -oh /u01/app/oracle/product/19.0.0/db_1
6)启动TFA 及 CRS
# /u01/app/19.0.0/grid/bin/tfactl start
# /u01/app/19.0.0/grid/bin/crsctl start crs