ITPub博客

首页 > 数据库 > Oracle > Windows平台下opatch apply报错:OUI-67073

Windows平台下opatch apply报错:OUI-67073

原创 Oracle 作者:skzhuga 时间:2018-12-07 11:31:02 0 删除 编辑

近期Oracle被安全部门扫出来不少漏洞,要打相应的补丁。Oracle版本是11.2.0.1,平台是Windows Server 2008 R2。

首先在MOS上下载了相应patch,解压,用opatch apply安装,结果报错:

[2018-12-7 10:08:35] [INFO]         opatch-external.jar is in C:\app\Administrator\product\11.2.0\dbhome_1\OPatch\jlib\opatch-external.jar

[2018-12-7 10:08:35] [INFO]         [OPSR-TIME] Loading cooked inventory

[2018-12-7 10:08:35] [INFO]         [OPSR-MEMORY] : Loading cooked one offs. Heap memory used 18 (MB)

[2018-12-7 10:08:35] [INFO]         [OPSR-MEMORY] : Loaded cooked oneoffs. Heap memory used : 18 (MB)

[2018-12-7 10:08:35] [INFO]         [OPSR-TIME] Cooked inventory loaded successfully

[2018-12-7 10:08:35] [INFO]         Checking if Oracle Home has components required by patches...

[2018-12-7 10:08:35] [INFO]         CheckMissingComps: Cached file does not exist or is invalid, re-build prereq result.

[2018-12-7 10:08:35] [INFO]         Checking conflict among patches...

[2018-12-7 10:08:35] [INFO]         Running prereq checkConflictAmongPatchesWithDetail

[2018-12-7 10:08:36] [INFO]         Following patches can be applied:  10100101

[2018-12-7 10:08:36] [INFO]         Following patches are not required:

[2018-12-7 10:08:36] [INFO]         Following patches are auto rollbackable:

[2018-12-7 10:08:36] [INFO]         Finished checking prereq checkConflictAmongPatchesWithDetail

[2018-12-7 10:08:36] [INFO]         Conflict checking amongst patches PASSED

[2018-12-7 10:08:36] [INFO]         Checking conflicts against Oracle Home...

[2018-12-7 10:08:36] [INFO]         Running prereq checkConflictAgainstOHWithDetail

[2018-12-7 10:08:36] [INFO]         Following patches can be applied:  10100101

[2018-12-7 10:08:36] [INFO]         Following patches are not required:

[2018-12-7 10:08:36] [INFO]         Following patches are auto rollbackable:

[2018-12-7 10:08:36] [INFO]         Finished checking prereq checkConflictAgainstOHWithDetail

[2018-12-7 10:08:36] [INFO]         Running prerequisite checks...

[2018-12-7 10:08:36] [INFO]         Space Needed : 835.45MB

[2018-12-7 10:08:36] [INFO]         Prereq checkPatchApplicableOnCurrentPlatform Passed for patch : 10100101

[2018-12-7 10:08:36] [INFO]         Following active files are not used by opatch process :

                                    C:\app\Administrator\product\11.2.0\dbhome_1\bin\oci.dll

                                    Following active files are used by opatch process :

[2018-12-7 10:08:36] [INFO]         Prerequisite check "CheckActiveFilesAndExecutables" failed.

                                    The details are:

                                    

                                    Following active files are not used by opatch process :

                                    C:\app\Administrator\product\11.2.0\dbhome_1\bin\oci.dll

                                    Following active files are used by opatch process :

[2018-12-7 10:08:36] [SEVERE]       OUI-67073:UtilSession 失败: Prerequisite check "CheckActiveFilesAndExecutables" failed.

[2018-12-7 10:08:36] [INFO]         Finishing UtilSession at Fri Dec 07 10:08:36 CST 2018

[2018-12-7 10:08:36] [INFO]         Log file location: C:\app\Administrator\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch2018-12-07_10-08-32上午_1.log

[2018-12-7 10:08:36] [INFO]         堆栈说明: java.lang.RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.

                                    at oracle.opatch.OPatchSessionHelper.runApplyPrereqs(OPatchSessionHelper.java:6699)

                                    at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:998)

                                    at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:368)

                                    at oracle.opatch.opatchutil.NApply.process(NApply.java:348)

                                    at oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1108)

                                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                                    at java.lang.reflect.Method.invoke(Method.java:597)

                                    at oracle.opatch.UtilSession.process(UtilSession.java:359)

                                    at oracle.opatch.OPatchSession.process(OPatchSession.java:2650)

                                    at oracle.opatch.OPatch.process(OPatch.java:784)

                                    at oracle.opatch.OPatch.main(OPatch.java:834)

                                    Caused by: java.lang.RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.

                                    ... 13 more

                                    Caused by: oracle.opatch.PrereqFailedException: Prerequisite check "CheckActiveFilesAndExecutables" failed.

                                    ... 13 more

报CheckActiveFilesAndExecutables,说明有Oracle的相关文件被锁定了。但报错日志中并没有列出哪些被锁定。

查看相关Oracle服务,都已经关闭了,应该没有文件被锁定才对:

仔细查看报错日志,发现

Following active files are not used by opatch process :

C:\app\Administrator\product\11.2.0\dbhome_1\bin\oci.dll

报oci.dll还处在活动状态,仔细想了想,虽然日志中应该是Windows在启动时根据Oracle的环境变量加载了某些文件,应该是这些文件导致opatch失败。因此采取以下措施:

  1.修改Windows环境变量,去掉path中Oracle相关配置

 2.将Oracle自动启动的服务调整为手动

重启Windows后,重新opatch apply,问题被成功解决。


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31544156/viewspace-2284483/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-06-28

  • 博文量
    16
  • 访问量
    5806