opatch lsinv和opatch lspatches都报错:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.
nzportadb:/u01/app/oracle>$ORACLE_HOME/OPatch/opatch lsinventory Oracle Interim Patch Installer version 11.2.0.3.19 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/db_1 Central Inventory : /u01/app/oraInventory from : /etc/oraInst.loc OPatch version : 11.2.0.3.19 OUI version : 11.2.0.4.0 Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-10-09_18-26-37PM_1.log LsInventorySession failed: OPatch failed to locate Central Inventory. Possible causes are: The Central Inventory is corrupted The oraInst.loc file specified is not valid.
查看了 /u01/app/oraInventory目录存在,OPatch权限正确
后来查找了杨总的一篇文章:
找到了解决办法
修改/etc/oraInst.loc 文件
当前我的
inventory_loc=/u01/app/oraInventory
但是实际上产品目录在
inventory_loc=/u01/app/oracle/oraInventory
修改好就可以正常执行了(我的/u01/app/oraInventory是没有什么东西的,/u01/app/oracle/oraInventory是有文件和目录的)