close

今天對 Docker 內的 Oracle Database 12c 上 Patch,下 $ORACLE_HOME/OPatch/opatch Apply 時出錯,

[oracle@be7dad568792 27105253]$ /opt/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch apply 
Oracle Interim Patch Installer version 12.2.0.1.12
Copyright (c) 2018, Oracle Corporation.  All rights reserved.


Oracle Home       : /opt/oracle/product/12.2.0.1/dbhome_1
Central Inventory : /opt/oracle/oraInventory
   from           : /opt/oracle/product/12.2.0.1/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.12
OUI version       : 12.2.0.1.4
Log file location : /opt/oracle/product/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2018-02-01_05-59-23AM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:


Following executables are active :
/opt/oracle/product/12.2.0.1/dbhome_1/bin/oracle
/opt/oracle/product/12.2.0.1/dbhome_1/lib/libclntsh.so.12.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /opt/oracle/product/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2018-02-01_05-59-23AM_1.log

OPatch failed with error code 73

去 Oracle Support 官網找到類似的一篇解決方法, 

opatch error code 73: Prerequisite check "CheckActiveFilesAndExecutables" failed. (Doc ID 1942237.1)

APPLIES TO: 

Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.

SYMPTOMS

opatch auto failed with error:

Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following executables are active :
/u01/app/11.2.0/grid/lib/libclntsh.so.11.1

OPatch failed with error code 73
 

CAUSE

This library is still being referenced by an active process:
/u01/app/11.2.0/grid/lib/libclntsh.so.11.1
 
This error during apply is indicative of the cause of the problem:

Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following executables are active :
/u01/app/11.2.0/grid/lib/libclntsh.so.11.1
 

SOLUTION

As per opatch*.log, there are still processes using one of the files that is being patched:
Following executables are active :
/u01/app/11.2.0/grid/lib/libclntsh.so.11.1

ACTION PLAN
~~~~~~~~~~~
1. As 'root' user, identify process using this file/library:
  # fuser /u01/app/11.2.0/grid/lib/libclntsh.so.11.1
  # lsof /u01/app/11.2.0/grid/lib/libclntsh.so.11.1

2. You may shutdown application or kill process using above file/library before trying opatch again.
  # crsctl stop crs -f
  # fuser /u01/app/11.2.0/grid/lib/libclntsh.so.11.1
  # kill -9 <ospid of process identified above>

 

照官方做以後,還是會有問題,果斷的停用所有服務,

Shutdown Listener、 Shutdown Database 後,再使用 opatch apply 就成功了。

arrow
arrow
    文章標籤
    Oracle OPatch
    全站熱搜

    StockMemo 發表在 痞客邦 留言(0) 人氣()