PROBLEM:

 

While running opatch lsinventory , got below error LsInventorySession failed: RawInventory gets null OracleHomeInfo:

oracle@dbhost1:…p/app/oraInventory/ContentsXML$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2020, Oracle Corporation. All rights reserved.

Oracle Home : /gsmoracle/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /crsapp/app/oraInventory
from : /gsmoracle/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.21
OUI version : 12.1.0.2.0
Log file location : /gsmoracle/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2020-12-01_13-23-06PM_1.log

List of Homes on this system:

Home name= OraGI12Home1, Location= “/crsapp/app/oracle/product/grid12c”
Home name= OraGI19Home1, Location= “/dumparea/oracle/app/grid19c”
LsInventorySession failed: RawInventory gets null OracleHomeInfo

OPatch failed with error code 73

 

 

SOLUTION:

 

This error is due to wrong entries of ORACLE_HOME in the inventory location. To fix this.

 


cd $ORACLE_HOME/oui/bin

oracle@dbhost1:...roduct/12.1.0/dbhome_1/oui/bin$ ./attachHome.sh
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB. Actual 375400 MB Passed
The inventory pointer is located at /var/opt/oracle/oraInst.loc

'AttachHome' was successful.

Now run opatch lsinventory command, it should work fine.


oracle@dbhost1:...roduct/12.1.0/dbhome_1/oui/bin$ $ORACLE_HOME/OPatch/opatch lsinventoryd