Thursday, October 3, 2013

Oracle Home inventory is corrupted

Environment Details:
OS: Linux 5.8
Database Version: 11.2.0.3.0
Oracle Home: /u01/app/oracle/product/11.2.0.3.0
Inventory Location: $ORACLE_HOME/oraInventory
Issue: The Oracle Home was cloned from a different server, when we try to run the opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc command, we were getting the error mentioned below.

-bash-3.2$ opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc 
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       : /u01/app/oracle/product/11.2.0.3.0
Central Inventory : /u01/app/oracle/product/11.2.0.3.0/oraInventory
   from           : /u01/app/oracle/product/11.2.0.3.0/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.3.0/cfgtoollogs/opatch/opatch2013-10-01_01-07-20AM.log

List of Homes on this system:

  Home name= linux_DB__slot_ems12345_oracle_db_tech_st_11_2_0, Location= "/u01/app/oracle/product/11.2.0"
Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
   Oracle Home dir. path does not exist in Central Inventory
   Oracle Home is a symbolic link
   Oracle Home inventory is corrupted
LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo

OPatch failed with error code 73

Solution: Did a through investigation and from the error noticed that it was taking a wrong oracle home. One of the suggestions was to recreate the inventory, but I checked the file /u01/app/oracle/product/11.2.0.3.0/oraInventory/ContentsXML/inventory.xml, the contents given below. I have modified the location LOC to the correct Home .i.e. /u01/app/oracle/product/11.2.0.3.0 and saved the file. When I issued the command opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc again, everything was fine and I got the output.

-bash-3.2$ opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc 
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       : /u01/app/oracle/product/11.2.0.3.0
Central Inventory : /u01/app/oracle/product/11.2.0.3.0/oraInventory
   from           : /u01/app/oracle/product/11.2.0.3.0/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.3.0/cfgtoollogs/opatch/opatch2013-10-01_01-12-44AM.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0.3.0/cfgtoollogs/opatch/lsinv/lsinventory2013-10-01_01-12-44AM.txt

-----------------------------------------------------------------
Installed Top-level Products (2): 

Oracle Database 11g                                                  11.2.0.3.0
Oracle Database 11g Examples                                         11.2.0.3.0
There are 2 products installed in this Oracle Home.

Interim patches (1) :

Patch  13366268     : applied on Mon Jun 10 21:58:09 PDT 2013
Unique Patch ID:  14394336
   Created on 21 Dec 2011, 08:14:06 hrs PST8PDT
   Bugs fixed:
     13366268
----------------------------------------------------------------
OPatch succeeded.

-bash-3.2$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2011, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.3.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="linux_DB__slot_ems12345_oracle_db_tech_st_11_2_0" LOC="/u01/app/oracle/product/11.2.0" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

1 comment:

  1. HomeZada provides a single online application to manage all the digital records of your home.

    ReplyDelete