This post is also available at:
Português

Running the command opatch lsinv
displays the error below:
opatch lsinv
Oracle Interim Patch Installer version 12.2.0.1.37
Copyright (c) 2024, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/19.21.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.21.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.37
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.21.0.0/dbhome_1/cfgtoollogs/opatch/opatch2024-04-11_11-38-32AM_1.log
List of Homes on this system:
Home name= OraGI19Home1, Location= "/u01/app/19.0.0.0/grid"
Home name= agent13c1, Location= "/oem_agent/agent_13.4.0.0.0"
Home name= agent13c2, Location= "/oem_agent/agent_13.5.0.0.0"
Home name= OraDB19Home1, Location= "/u01/app/oracle/product/19.3.0.0/dbhome_1"
Home name= OraHome1, Location= "/oem_agent/GoldImage_OEM_13.5_33355570/agent_13.5.0.0.0"
Home name= Orasiha19c_home1_5249, Location= "/u01/app/19.21.0.0/grid"
LsInventorySession failed: RawInventory gets null OracleHomeInfo
OPatch failed with error code 73
BashThe error occurs because ORACLE_HOME was entered incorrectly in the inventory.
To correct this, simply follow the procedure below:
cd $ORACLE_HOME/oui/bin
/u01/app/oracle/product/19.21.0.0/dbhome_1/oui/bin> ./attachHome.sh
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.
BashOnce you’ve done this, just run the command again and it will give you the result.