19c新环境安装补丁

测试环境linux 2节点RAC19C 新环境安装补丁比较简单

RAC正常打补丁流程!

一.使用opatchauto opatchauto

1.节点1root执行会自动关闭当前节点db实例,自动打gi,oracle 软件补丁

2.节点2root再执行;

3.最后数据库执行应用脚本,补丁安装完毕;

二.使用opatchauto opatchauto -oh $ORACLE_HOME OR $GRID_HOME 

与11g版本相同

1.节点1 GI打

2.节点2 GI打

3.节点1 Oracle软件打补丁

4.节点2 Oracle

5. DB执行脚本

 

正常流程
A
[root@d1 ~]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /u01/oracle/30464035
[root@d2 ~]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /u01/oracle/30464035

su - oracle

alter pluggable database all open

cd $ORACLE_HOME/OPatch

./datapatch -verbose

or

B

node1 root, node2 root

/u01/app/19.0.0/grid/OPatch/opatchauto apply /u01/oracle/30464035 -oh /u01/app/19.0.0/grid

/u01/app/19.0.0/grid/OPatch/opatchauto apply /u01/oracle/30464035 -oh /u03/app/oracle/product/19.0.0/db_1

su - oracle

alter pluggable database all open

cd $ORACLE_HOME/OPatch

./datapatch -verbose

=========================完毕!
1.本次测试环境打补丁不顺利!
节点1执行,正常
[root@d2 ~]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /u01/oracle/30464035
节点2执行,异常报错

opatchauto failed with error code 42
--------------------------------------------------------------------------------------------------------

[Apr 2, 2020 3:33:06 PM] [INFO] Following active executables are not used by opatch process :
/u01/app/19.0.0/grid/bin/oracle
/u01/app/19.0.0/grid/bin/tnslsnr
/u01/app/19.0.0/grid/lib/libclntsh.so.19.1
/u01/app/19.0.0/grid/lib/libasmclntsh19.so
Following active executables are used by opatch process :
[Apr 2, 2020 3:33:06 PM] [INFO] Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following active executables are not used by opatch process :
/u01/app/19.0.0/grid/bin/oracle
/u01/app/19.0.0/grid/bin/tnslsnr
/u01/app/19.0.0/grid/lib/libclntsh.so.19.1
/u01/app/19.0.0/grid/lib/libasmclntsh19.so

Following active executables are used by opatch process :
[Apr 2, 2020 3:33:06 PM] [SEVERE] OUI-67073:UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.

==
# lsof | grep /u01/app/19.0.0/grid/bin/oracle
# lsof | grep /u01/app/19.0.0/grid/bin/tnslsnr
# lsof | grep /u01/app/19.0.0/grid/lib/libclntsh.so.19.1
# lsof | grep /u01/app/19.0.0/grid/lib/libasmclntsh19.so
# kill -9 PID

参考解决方法,kill进程无法解决,因为这些进程除非关闭crs!

Grid Infrastructure:OPatch apply (manual step) fails to apply patch because perl process is running (Doc ID 2409442.1)
https://blog.csdn.net/jycjyc/article/details/103083192

关闭crs在打补丁

关闭crs,打补丁无法使用opatchauto!
# /u01/app/19.0.0/grid/bin/crsctl stop crs -f
[root@d2 ~]# /u01/app/19.0.0/grid/bin/crsctl start crs
ManualSteps for Apply/Rollback Patch
See My Oracle Support Document 2246888.1for cases where opatchauto cannotbe used.

 

补丁回滚!

[grid@d2:/u01/oracle/30464035]$ /u01/app/19.0.0/grid/OPatch/opatch rollback -id 30446054

回滚失败。导致集群节点2  crs无法启动!

在打补丁的过程中,会对Lib等等进行备份修改,如果rollback失败,将导致CRS无法启动。

 

opatchauto apply /u01/media/patch/30133178/30116789  -oh /u01/app/19.5/grid

posted @ 2020-04-15 18:10  绿茶有点甜  阅读(1656)  评论(0编辑  收藏  举报