Wednesday 4 January 2017

The Central Inventory is corrupted. The oraInst.loc file specified is not valid.

The Central Inventory is corrupted. The oraInst.loc file specified is not valid.
                                                 

Summary 
Trying to run $ opatch lsinventory to get the list of applied patches and software in an oracle installation and get the error:
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.

Oracle Home       : /p6data/orauser/osm/produt/11.2.0
Central Inventory : /oracle/DwhProd/orabin/oradb/oraInventory
   from           : /var/opt/oracle/oraInst.loc

OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0

Log file location : /p6data/orauser/osm/produt/11.2.0/cfgtoollogs/opatch/opatch2013-01-10_12-00-26PM.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.

Possible causes are: 

    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.

OPatch failed with error code 73
The reason for the error is that the content from file /var/opt/oracle/oraInst.loc is different from the content of file $ORACLE_HOME/oraInst.loc (where is supposed it has be the correct info). Usually the problem is that the file is owned by a different user/installation.

Workaround: Check the contents for the correct file $ORACLE_HOME/oraInst.loc and the contents of /var/opt/oracle/oraInst.loc

0. Rename the file: $ mv /var/opt/oracle/oraInst.loc /var/opt/oracle/oraInst.loc.old
1. Copy the new one: $ cp $ORACLE_HOME/oraInst.loc /var/opt/oracle/oraInst.loc
2. Run again the $ opatch lsinventory
$ cd $ORACLE_HOME/OPatch
$ opatch lsinventory

Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.

Oracle Home       : /p6data/orauser/osm/produt/11.2.0
Central Inventory : /p6data/orauser/oraInventory
   from           : /var/opt/oracle/oraInst.loc

OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0

Log file location : /p6data/orauser/osm/produt/11.2.0/cfgtoollogs/opatch/opatch2013-01-11_10-23-05AM.log

Lsinventory Output file location : /p6data/orauser/osm/produt/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2013-01-11_10-23-05AM.txt

--------------------------------------------------------------------------------

Installed Top-level Products (1): 
Oracle Database 11g                                                  11.2.0.3.0
There are 1 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.
-------------------------------------------------------------------------------
OPatch succeeded.

Inventory lock file is stored in below location: another way to run opatch lsinventory
remove or backup  lock file from oralnventory and run opatch lsinventory
inventory_loc=/u9000/home/oracle/oraInventory
inst_group=oinstall

No comments:

Post a Comment