EBS R12 opatch lsinventory 报错
报错1
出现 -bash: opatch: command not found,需将opatch路径加入$PATH中
export PATH=$ORACLE_HOME/Opatch:$PATH
报错2
OPatch cannot find a valid oraInst.loc file to locate Central Inventory.
OPatch failed with error code 104
当这个文件不在默认的路径时,我们可以加“-invPtrLoc ”来指明oraInst.loc的地址:
$ORACLE_HOME/OPatch/opatch lsinventory -invPtrLoc /etc/oraInst.loc ,发现没这个文件,可以用$ORACLE_HOME/admin/oui//oraInst.loc
参考文档How to find the location of GLOBAL Inventory and LOCAL inventory on R12.x ? Why Some Times, There are Issues With The oraInventory Registration During The Post Clone ? (文档 ID 878717.1)
再次运行:
报错3: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
重建oraInventory(central Inventory)
cd $ORACLE_HOME/oui/bin
./attachHome.sh
发现重建不了,报错,查看attachHome.sh内容,发现ORACLE_HOME=$ORACLE_HOME
ORACLE_HOME_NAME=内容不正确,修改它,再次执行./attachHome.sh,会自动修改$ORACLE_HOME/admin/oui//oraInventory/ContentsXML里inventory.xml的内容
参考文档 OPatch error: "Inventory load failed... OPatch cannot load inventory for the given Oracle Home." (文档 ID 864117.1)
再次执行 opatch lsinventory, OK
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23169974/viewspace-1097264/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23169974/viewspace-1097264/