Inventory is the index for the oracle installation. All the details about the ORACLE_HOME including different utility versions, patch details etc. If you do a fresh Oracle installation the inventory will be updated. But if you copy the ORACLE binaries from some other location and if you are not updating the inventory, we cannot read the inventory using opatch utility.
Step 1: checking the inventory of a corrupted database using opatch lsinventory
$ORACLE_HOME/OPatch/opatch lsinventory Oracle Interim Patch Installer version 12.1.0.1.7 Copyright (c) 2016, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/12.1.0.2/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc OPatch version : 12.1.0.1.7 OUI version : 12.1.0.2.0 Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2015-07-25_11-26-44AM_1.log OPatch failed to locate Central Inventory. Possible causes are: The Central Inventory is corrupted The oraInst.loc file specified is not valid. LsInventorySession failed: OPatch failed to locate Central Inventory. OPatch failed with error code 73
Solution:
Re-create the central inventory
Run the following command to fix the inventory in Unix prompt from ORACLE_HOME directory
$ORACLE_HOME/oui/bin/runInstaller -silent -ignoreSysPrereqs -invPtrLoc "/u01/app/oracle/product/12.1.0.2/db_1" -attachHome ORACLE_HOME="/u01/app/oracle/product/12.1.0.2/db_1" ORACLE_HOME_NAME="OraDb12c_home1" Starting Oracle Universal Installer… Checking swap space: must be greater than 500 MB. Actual 23750 MB Passed The inventory pointer is located at /var/opt/oracle/oraInst.loc 'AttachHome' was successful.
Now your corrupted Oracle inventory is fixed. Once again you check your inventory with opatch command.
$ORACLE_HOME/OPatch/opatch lsinventory Oracle Interim Patch Installer version 12.1.0.1.7 Copyright (c) 2016, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/12.1.0.2/db_1 Central Inventory : /u01/app/oracle/oraInventory from : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc OPatch version : 12.1.0.1.7 OUI version : 12.1.0.2.0 Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2015-01-25_11-26-44AM_1.log Lsinventory Output file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory2015-01-25_11-26-44AM.txt Installed Top-level Products (1): Oracle Database 12c 12.1.0.2.0 There are 1 products installed in this Oracle Home. Interim patches (1) : Patch 20415564 : applied on Wed Jul 01 11:18:48 MDT 2015 Unique Patch ID: 18768682 Patch description: “Database PSU 12.1.0.2.3, Oracle JavaVM Component (Apr2015)” Created on 1 Apr 2015, 06:55:25 hrs PST8PDT Bugs fixed: 19699946, 19909862, 19223010, 19877336, 19895326, 20408829, 19153980 20415564, 19855285, 19895362, 19231857, 19245191, 20408866 ——————————————————————————– OPatch succeeded.