1、执行opatch apply打补丁的时候,报OPatch failed with error code 104错误,
找不到有效的oraInst.loc文件,具体如下所示:
oracle@kevin.example.com:~/linux_patch/12419384> opatch apply
Invoking OPatch 11.1.0.8.5
Oracle Interim Patch Installer version 11.1.0.8.5
Copyright (c) 2011, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11g/db
Central Inventory : n/a
from :
OPatch version : 11.1.0.8.5
OUI version : 11.1.0.7.0
OUI location : /opt/oracle/product/11g/db/oui
Log file location : n/a
Patch history file: /opt/oracle/product/11g/db/cfgtoollogs/opatch/opatch_history.txt
OPatch cannot find a valid oraInst.loc file to locate Central Inventory.
OPatch failed with error code 104
2、执行opatch lsinventory查看之前已应用的补丁情况,也报一样的错误。
oracle@kevin.example.com:~/linux_patch/12419384> opatch lsinventory
Invoking OPatch 11.1.0.8.5
Oracle Interim Patch Installer version 11.1.0.8.5
Copyright (c) 2011, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/11g/db
Central Inventory : n/a
from :
OPatch version : 11.1.0.8.5
OUI version : 11.1.0.7.0
OUI location : /opt/oracle/product/11g/db/oui
Log file location : n/a
Patch history file: /opt/oracle/product/11g/db/cfgtoollogs/opatch/opatch_history.txt
OPatch cannot find a valid oraInst.loc file to locate Central Inventory.
OPatch failed with error code 104
3、对于该错误,我们可以指明oraInst.loc文件的绝对路径来执行相应的命令,如下所示:
opatch lsinventory -invPtrLoc /opt/oracle/product/11g/db/oraInst.loc
opatch apply -invPtrLoc /opt/oracle/product/11g/db/oraInst.loc
4、或者从其他相同版本的数据库软件目录下拷贝/opt/oracle/oraInventory目录和/etc/oraInst.loc文件
到相对应的目录
5、当然,也是可以重建的,(注意替换你自己的ORACLE_HOME和ORACLE_HOME_NAME):
/opt/oracle/product/11g/db/oui/bin/runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/opt/oracle/product/11g/db/" ORACLE_HOME_NAME="home1"
6、比如执行opatch lsinventory出现如下错误,则重建oraInventory,可以解决
Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
Oracle Home dir. path does not exist in Central Inventory
Oracle Home is a symbolic link
Oracle Home inventory is corrupted
LsInventorySession failed: OracleHomeInventory::load() gets null oracleHomeInfo
OPatch failed with error code 73