oracle@tsl0map-dbteam-sandbox-db04:[vegdb01]# opatch lsinventory Oracle Interim Patch Installer version 12.1.0.1.3 Copyright (c) 2017, Oracle Corporation. All rights reserved. Oracle Home : /u01/oracle/product/12102 Central Inventory : /home/oracle/oraInventory from : /u01/oracle/product/12102/oraInst.loc OPatch version : 12.1.0.1.3 OUI version : 12.1.0.2.0 Log file location : /u01/oracle/product/12102/cfgtoollogs/opatch/opatch2017-09-12_15-30-47PM_1.log List of Homes on this system: Home name= agent13c2, Location= "/u01/oracle/product/agent13c/agent_13.2.0.0.0" Home name= 11204, Location= "/u01/oracle/product/11204" Home name= OraHome3, Location= "/u01/oracle/product/gg121" 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 gets null oracleHomeInfo OPatch failed with error code 73
Turned out my inventory had not been updated with my new Oracle Home. When I looked in the inventory.xml file on my server, there was no entry for the installation there.
To fix this, add the new OH to your inventory. From your OH that is missing, do the following:
cd $ORACLE_HOME/oui/bin ./runInstaller -invPtrLoc /u01/oracle/product/12102/oraInst.loc -attachHome ORACLE_HOME=/u01/oracle/product/12102 ORACLE_HOME_NAME="Ora12cHome" Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 8191 MB Passed The inventory pointer is located at /u01/oracle/product/12102/oraInst.loc 'AttachHome' was successful.
Check the inventory file now, and you'll see a new entry for the OH (in my case the Ora12cHome):
<HOME NAME="agent13c2" LOC="/u01/oracle/product/agent13c/agent_13.2.0.0.0" TYPE="O" IDX="8"/> <HOME NAME="11204" LOC="/u01/oracle/product/11204" TYPE="O" IDX="1"/> <HOME NAME="Ora12cHome" LOC="/u01/oracle/product/12102" TYPE="O" IDX="9"/>