在部署有OGG的数据库主机上打数据库patch遇到的问题$ORACLE_HOME/lib/libclntsh.so.11.1 active
例如以下是报错提示:
[oracle@lei1 17579684]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply Oracle Interim Patch Installer version 11.2.0.3.10 Copyright (c) 2015, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc OPatch version : 11.2.0.3.10 OUI version : 11.2.0.3.0 Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/17579684_Jun_29_2015_16_41_59/apply2015-06-29_16-41-58PM_1.log Applying interim patch '17579684' to OH '/u01/app/oracle/product/11.2.0/dbhome_1' Verifying environment and performing prerequisite checks... Prerequisite check "CheckActiveFilesAndExecutables" failed. The details are: Following executables are active : /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 Log file location: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/17579684_Jun_29_2015_16_41_59/apply2015-06-29_16-41-58PM_1.log Recommended actions: OPatch needs to modify files which are being used by some processes. OPatch failed with error code 41 [oracle@lei1 17579684]$
非常奇怪,为啥提示还占用,db instance 和db listener 都事先关闭了。
以下fuser和lsof上场:
[root@lei1 ~]# fuser /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: 3288m [root@lei1 ~]# lsof /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ggsci 3288 oracle mem REG 253,0 52699035 661288 /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 [root@lei1 ~]#
原来是ggsci程序还在訪问libclntsh.so.11.1,事实上,当时ogg的进程已经stop了,可是ggsci并没有退出。退出ggsci就可以。然后又一次opatch apply 就可以!
參考文章:
OPatch failed with error code 73 (文档 ID 1942237.1)