今日对一个SOLARIS sparc环境进行psu补丁加载,在执行opatch apply时候,报错如下:
[Nov 13, 2020 9:45:45 AM] Patch history file: /orcl/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
[Nov 13, 2020 9:45:49 AM] Verifying environment and performing prerequisite checks…
[Nov 13, 2020 9:45:49 AM] Ignoring file “/ogg/31537677/README.html” in the patch directory.
[Nov 13, 2020 9:45:49 AM] Ignoring file “/ogg/31537677/README.txt” in the patch directory.
[Nov 13, 2020 9:45:49 AM] Ignoring file “/ogg/31537677/patchmd.xml” in the patch directory.
[Nov 13, 2020 9:45:50 AM] OUI-67100:NApply could not load patch from location ‘/ogg/31537677/31103343’
[Nov 13, 2020 9:45:50 AM] OUI-67073:UtilSession failed: Version field of the component “delete” in actions file cannot be or empty. Please check patch metadata.
[Nov 13, 2020 9:45:50 AM] Finishing UtilSession at Fri Nov 13 09:45:50 CST 2020
[Nov 13, 2020 9:45:50 AM] Log file location: /orcl/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2020-11-13_09-45-44AM_1.log
[Nov 13, 2020 9:45:50 AM] Stack Description: java.lang.RuntimeException: Version field of the component “delete” in actions file cannot be or empty. Please check patch metadata.
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.PatchObject.createPatchObject(PatchObject.java:2444)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.PatchObject.(PatchObject.java:2000)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.PatchObjectUtil.loadPatch(PatchObjectUtil.java:2188)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.opatchutil.OPatchUtilHelper.loadPatchObject(OPatchUtilHelper.java:717)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.opatchutil.OPatchUtilHelper.loadAndInitPatchObject(OPatchUtilHelper.java:1239)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.opatchutil.OPatchUtilHelper.getPatchesToApply(OPatchUtilHelper.java:969)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.opatchutil.OPatchUtilHelper.getPatchesToApply(OPatchUtilHelper.java:1296)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.opatchutil.NApply.process(NApply.java:449)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1136)
[Nov 13, 2020 9:45:50 AM] StackTrace: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[Nov 13, 2020 9:45:50 AM] StackTrace: sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[Nov 13, 2020 9:45:50 AM] StackTrace: sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[Nov 13, 2020 9:45:50 AM] StackTrace: java.lang.reflect.Method.invoke(Method.java:592)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.UtilSession.process(UtilSession.java:322)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.OPatchSession.main(OPatchSession.java:2343)
[Nov 13, 2020 9:45:50 AM] StackTrace: oracle.opatch.OPatch.main(OPatch.java:614)
因为此数据库一直未加载补丁,opatch版本还是11.2.0.1.3.6.尝试对OPATCH版本进行更新。
Oracle Interim Patch Installer version 11.2.0.3.25
继续执行脚本更新:
-bash-3.00$ cd /ogg/31537677/
-bash-3.00$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.25
Copyright © 2020, Oracle Corporation. All rights reserved.
Oracle Home : /orcl/oracle/product/11.2.0/db_1
Central Inventory : /orcl/oraInventory
from : /orcl/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.25
OUI version : 11.2.0.4.0
Log file location : /orcl/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2020-11-13_09-49-15AM_1.log
Verifying environment and performing prerequisite checks…
Prerequisite check “CheckActiveFilesAndExecutables” failed.
The details are:
报错文件占用。使用fuser -k命令进行进程清除。。。。。
Following active executables are not used by opatch process :
/orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
Following active executables are used by opatch process :
UtilSession failed: Prerequisite check “CheckActiveFilesAndExecutables” failed.
Log file location: /orcl/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2020-11-13_09-49-15AM_1.log
OPatch failed with error code 73
-bash-3.00$ fuser /orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
/orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1: 15788m 15787m 15786m 15785m 15784m
-bash-3.00$ fuser -ck /orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
/orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1: fuser: Invalid argument
-bash-3.00$ fuser /orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
/orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1: 15788m 15787m 15786m 15785m 15784m
-bash-3.00$
-bash-3.00$ fuser -k /orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
/orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1: 15788m 15787m 15786m 15785m 15784m
-bash-3.00$ fuser -k /orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
/orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1:
-bash-3.00$ fuser -k /orcl/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
在执行opatch apply 执行成功。