This post is also available in:
Running opatch lsinv produces the following output:
LsInventorySession failed: RawInventory gets null OracleHomeInfo
OPatch failed with error code 73OPatch lists every other Oracle Home on the system just fine, but chokes when it tries to process the current home — the one set in $ORACLE_HOME. Until this is fixed, no patching operations can run against that home.
💡 Real-world context This error shows up most often after an out-of-place patch cycle — you clone the Oracle Home to a new directory, apply the RU, then switch
$ORACLE_HOMEto point to it. The software is there and works, but OUI never registered the new path in the Central Inventory. Same thing happens after manualcp/rsyncclones or filesystem restores done without also restoring the inventory.
Why This Happens
OPatch reads the Central Inventory (typically /u01/app/oraInventory, as defined in oraInst.loc) to build metadata for each Oracle Home before performing any operation. When a home exists on disk but has no entry in the Central Inventory, OPatch can’t construct the OracleHomeInfo object — it gets null back and bails with error code 73.
Common root causes:
- Oracle Home cloned via
cp,rsync, or storage snapshot without runningattachHome.sh - Out-of-place upgrade or patching to a new directory without re-registering the home
- Filesystem restore without a matching inventory restore
- Accidental corruption or deletion of
inventory.xml
Diagnosis
Before applying the fix, confirm the home is actually missing from the inventory.
1. Check the Central Inventory for the failing home:
grep -i "OraDB19Home" /u01/app/oraInventory/ContentsXML/inventory.xmlIf $ORACLE_HOME doesn’t appear — or appears with REMOVED="T" — the diagnosis is confirmed.
2. Verify which home is active:
echo $ORACLE_HOMECross-reference this path against the inventory.xml entries. The home OPatch finds on disk but can’t locate in the inventory is the one causing the failure.
Fix — Register the Oracle Home in the Central Inventory
Run attachHome.sh from inside the failing Oracle Home:
cd $ORACLE_HOME/oui/bin
./attachHome.shExpected output:
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 19889 MB Passed
The inventory pointer is located at /etc/oraInst.loc
You can find the log of this install session at:
/u01/app/oraInventory/logs/AttachHome2024-04-11_11-42-20AM.log
'AttachHome' was successful.Validate the fix:
grep "$ORACLE_HOME" /u01/app/oraInventory/ContentsXML/inventory.xml
$ORACLE_HOME/OPatch/opatch lsinvopatch lsinv should now return the list of installed patches without errors.
Quick Reference
echo $ORACLE_HOME
grep "$ORACLE_HOME" /u01/app/oraInventory/ContentsXML/inventory.xml
cd $ORACLE_HOME/oui/bin && ./attachHome.sh
$ORACLE_HOME/OPatch/opatch lsinvReferences
- Oracle Support: OPatch lsinventory Fails With “LsInventorySession failed: RawInventory gets null OracleHomeInfo” (Doc ID 1604062.1)
- Oracle Docs: OPatch User’s Guide for Windows and UNIX — attachHome
