The Central Oracle Inventory is corrupted

The oraInst.loc file specified is not valid.

./opatch lsinventory

Oracle Interim Patch Installer version 12.2.0.1.13

Copyright (c) 2019, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/12.1.0.2/home_1

Central Inventory : /home/oracle/oraInventory

   from           : /u01/app/oracle/product/12.1.0.2/home_1/oraInst.loc

OPatch version    : 12.2.0.1.13

OUI version       : 12.1.0.2.0

Log file location : /u01/app/oracle/product/12.1.0.2/home_1/cfgtoollogs/opatch/opatch2019-10-09_10-12-49AM_1.log

LsInventorySession failed: OPatch failed to locate Central Inventory.

Possible causes are:

    The Central Inventory is corrupted

    The oraInst.loc file specified is not valid.

OPatch failed with error code 73


Troubleshooting

Verify the content of $ORACLE_HOME/oraInst.loc

cat /u01/app/oracle/product/12.1.0.2/home_1/oraInst.loc

inventory_loc=/home/oracle/oraInventory

inst_group=dba


Next verify the content of /etc/oraInst.loc

cat /etc/oraInst.loc

inventory_loc=/ora_app/oraInventory

inst_group=dba


Findings: As you can see the contents of both the files are different. 

Let us find out where the Inventory file actually exists


ls -lrt /home/oracle/oraInventory

total 0 <= no file exists here


ls -lrt /ora_app/oraInventory

total 32

-rwxrwx--- 1 oracle dba  1533 Jun 27  2016 orainstRoot.sh

-rw-rw---- 1 oracle dba    55 Jun 27  2016 oraInst.loc

drwxrwx--- 6 oracle dba  4096 Jun 27  2016 backup

drwxrwx--- 2 oracle dba 16384 Aug 26 22:02 logs

drwxrwx--- 2 oracle dba  4096 Oct  9 10:12 ContentsXML


So the inventory exists at  /ora_app/oraInventory. The location of the inventory from /etc/oraInventory is correct.


Solution:

Replace the  oraInst.loc file in OH with the copy of oraInst.loc in /etc/oraInst.loc

mv /u01/app/oracle/product/12.1.0.2/home_1/oraInst.loc  /u01/app/oracle/product/12.1.0.2/home_1/oraInst.loc_wrong

cp /etc/oraInst.loc /u01/app/oracle/product/12.1.0.2/home_1/oraInst.loc

cat /u01/app/oracle/product/12.1.0.2/home_1/oraInst.loc

inventory_loc=/ora_app/oraInventory

inst_group=dba


Steps to Recreate Lost/corrupted oraInventory in Oracle

LsInventorySession failed: OPatch failed to locate Central Inventory. The Central Inventory is corrupted or oraInst.loc file specified is not valid OPatch failed with error code 73.

In case if central inventory is lost or corrupted then you will get this type of error. I executed opatch lsinventory and encountered with the below error.

LsInventorySession failed: OPatch failed to locate Central Inventory.

 Possible causes are:

     The Central Inventory is corrupted

     The oraInst.loc file specified is not valid.

OPatch failed with error code 73 


Check the above commands to verify whether active oracle inventory directory is correct.

If yes then run below command to re-create the oracle inventory.


$ ./runInstaller -silent -invPtrLoc "/etc/oraInst.loc" -attachHome ORACLE_HOME="/home/oracle/Oracle/Middleware/Oracle_IDM1" ORACLE_HOME_NAME="Oracle_IDM1"

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 150 MB.   Actual 25935 MB    Passed

Checking swap space: must be greater than 500 MB.   Actual 8083 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2023-02-24_02-33-03PM. 

Please wait ...[oracle@hostname bin]$ The inventory pointer is located at /etc/oraInst.loc

The inventory is located at /home/oracle/app/oraInventory

'AttachHome' was successful. 

Comments

Popular posts from this blog

PUTTY - The server's host key is not cached in the registry cache

OIM-12c Installation - FMW - SOA - IDM

SAML & OAuth 2.0