Oracle DBA – A lifelong learning experience

Posts Tagged ‘inventory’

Corrupted Oracle inventory

Posted by John Hallas on January 30, 2009

I have already blogged  about how to move an incorrectly placed Oracle Inventory but in this case we had a corrupted Oracle inventory.

>> $ORACLE_HOME/OPatch/opatch lsinventory
Invoking OPatch

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

Oracle Home : /app/oracle/product/11.1.0/db_1
Central Inventory : /app/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version :
OUI version :
OUI location : /app/oracle/product/11.1.0/db_1/oui
Log file location : /app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2009-01-29_10-56-52AM.log

list of Homes on this system:

Home name= OraDb11g_home1, Location= “”
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

 Searching around on the net the best solution for the issue was to attach a new Oracle Home

./runInstaller -silent -attachHome -invPtrLoc /var/opt/oracle/oraInst.loc ORACLE_HOME= “/app/oracle/product/11.1.0/db_1”
Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB. Actual 24576 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-01-29_11-02-45AM. Please wait …
>> The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /app/oracle/oraInventory
OUI-10197:Unable to create a new Oracle Home at . Oracle Home already exists at this location.

Select another location.


This was rather frustrating because I knew OH already existed, I was just trying to register it into the inventory.


I spent a lot of time detaching and attaching the OH, all with no success. Note that there is an opatch lsineventory –detail option which shows all the installed products as well as patches.


The issue was that the inventory.xml file was corrupted. I did try and remove it and create a new one but it also required a file comps.xml which appeared to be corrupted as well (no idea how).


Once I knew which files were required


/app/oracle/oraInventory/ContentsXML $ls

comps.xml inventory.xml libs.xml


I actually FTP’d them from a server where the Oracle build was identical (just an install, upgraded to and all was well with the world.


However this method is unsupported by Oracle and is not recommended. In my case it was for a test system and was worth the effort over the time lost in de-installing and re-installing.


Posted in Oracle | Tagged: , , , , , , | 8 Comments »

How to move the central Inventory (oraInventory) to another location.

Posted by John Hallas on October 2, 2008

Solution On Unix:


Find the current location of the central inventory (normally $ORACLE_BASE/oraInventory):

For example:

find /home/oracle -name oraInventory -print 



Open the oraInst.loc file in /var/opt/oracle and check the value of inventory_loc

cat /var/opt/oracle/oraInst.loc

inventory_loc=/u01/app/oracle/oraInventory inst_group=oinstall


Remark: The oraInst.loc file is simply a pointer to the location of the central inventory (oraInventory)


Copy the oraInventory directory to the destination directory

cp -Rp /home/oracle/oraInventory /app/oracle


Edit the oraInst.loc file to point to the new location

For example:

vi /var/opt/oracle/oraInst.loc

inventory_loc=/app/oracle/oraInventory inst_group=dba

· 2008/10/02 12:11 · John Hallas · 0 Comments

Posted in Oracle | Tagged: , , | 5 Comments »