Fixing a Corrupted Oracle Inventory File (2024)

The Oracle Central Inventory is used to document and track all Oracle software products on a given host (machine).Each piece of Oracle software has its own Central Inventory pointer file.

The Central Inventory is used to provide details of all patches applied to a given installation. It also allows users to check for any conflicts between items to be installed. The Oracle Inventory is an essential tool for supporting your Oracle environment.

I’m working with a customer to streamline, stabilize, and secure their entire infrastructure.The latest Patch Set Updates (PSU) were delivered and I started detailing the process to get that patch set into their development environment.

Because the Inventory is used to detail software installation and current patch levels, I needed to check it to be able to install the patches. I was unable to run theopatch lsinventorycommand. The information returned suggested the Inventory was corrupted. Specifically, the message returned was:

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

I dug through Support Documents, tried my hand at fixing the inventory, and even attempted to manually edit the inventory. In this instance it was easier and quicker to rebuild the corrupted inventory.

In order to do so, I needed to run the following code:

[devenv01]/home/oracle > hostname


Checking oratab I see that three different Oracle Home versions are in use, as follows:

cat /etc/oratab








Next, running the Inventory list allows me to discover the precise Inventory location.

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

Central Inventory : /u01/app/oracle/oraInventory

from : /u01/app/oracle/product/

OPatch version :

OUI version :

Log file location : /u01/app/oracle/product/

I now set $ORACLE_HOME to 12.1. This ensures I am now using software from the latest installation. I need to go to that Inventory location and backup the Inventory File:



[devenv01]/u01/app/oracle/oraInventory/ContentsXML> cp inventory.xml inventory.xml.bkup.01202016

Now, delete or remove the original Inventory file.

[devenv01]/u01/app/oracle/oraInventory/ContentsXML> > inventory.xml

The simplest fix in this particular case was to build the Inventory via loading each Oracle Home. This approach should work for release 10gR2 or higher. To execute:







Then, once this task is complete, you need to move to the Installer directory of Oracle Home:

cd /u01/app/oracle/product/

[devenv01]/u01/app/oracle/product/> ls* filesList.bat* lsnodes* runInstaller*** resource/*****

Populate the inventory with the Attach Home command. Repeat this process for each and every installation.

./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=”/u01/app/oracle/product/″ ORACLE_HOME_NAME=”OraDb10g_home1″

./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=”/u01/app/oracle/product/″ ORACLE_HOME_NAME=”OraDb11g_home1″

./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=”/u01/app/oracle/product/″ ORACLE_HOME_NAME=”OraDb12c_home1″

The execution of this should appear as follows:

[devenv01]/u01/app/oracle/product/> ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=”/u01/app/oracle/product/″ ORACLE_HOME_NAME=”OraDb10g_home1″

Starting Oracle Universal Installer…

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

The inventory pointer is located at /var/opt/oracle/oraInst.loc

‘AttachHome’ was successful.

[devdb501]/u01/app/oracle/product/> ORACLE_HOME_NAME=OraDb10g_home1

[devdb501]/u01/app/oracle/product/> ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=”/u01/app/oracle/product/″ ORACLE_HOME_NAME=”OraDb10g_home1″

[devdb501]/u01/app/oracle/product/> ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=”/u01/app/oracle/product/″ ORACLE_HOME_NAME=”OraDb11g_home1″

Starting Oracle Universal Installer…

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

The inventory pointer is located at /var/opt/oracle/oraInst.loc

‘AttachHome’ was successful.

Checking the Inventory for each Oracle Home, we see that the process was successful. Any of the patches and information about the Inventory are returned with any opatch command. Here is an example of what you might see:

[devdb501]/home/oracle> $ORACLE_HOME/OPatch/opatch lsinventory

Oracle Interim Patch Installer version

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

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

Central Inventory : /u01/app/oracle/oraInventory

from : /u01/app/oracle/product/

OPatch version :

OUI version :

Log file location : /u01/app/oracle/product/

Lsinventory Output file location : /u01/app/oracle/product/

Installed Top-level Products (1):

Oracle Database 12c

There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch 20415564 : applied on Wed Jul 01 11:18:48 MDT 2015

Unique Patch ID: 18768682

Patch description: “Database PSU, Oracle JavaVM Component (Apr2015)”

Created on 1 Apr 2015, 06:55:25 hrs PST8PDT

Bugs fixed:

19699946, 19909862, 19223010, 19877336, 19895326, 20408829, 19153980

20415564, 19855285, 19895362, 19231857, 19245191, 20408866


OPatch succeeded.


A stable database environment is the result of a clean and concise initial installation.Making certain your database has the latest patches installed is an essential part of the ongoing process of supporting that environment. Although it may seem time-consuming, a database professional needs to frequently make time to attend to documenting and fixing seemingly small issues as they are uncovered. This eliminates the probability for them to become large problems later.

We’ve previously offered other ideas for working with Oracle, including a webinar with Chuck Ezell on the value of conducting Oracle Health Checks. If you have questions about how to optimize your Oracle configuration, Datavail can work with you and your organization to effectively support your Oracle environment for your benefit and that of your clients and customers.

To learn more about our remote database services and how our experts can help with your ongoing Oracle operations, please contact Datavail to discuss a custom solution designed for your enterprise.

Fixing a Corrupted Oracle Inventory File (2024)
Top Articles
Latest Posts
Article information

Author: Delena Feil

Last Updated:

Views: 6505

Rating: 4.4 / 5 (45 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Delena Feil

Birthday: 1998-08-29

Address: 747 Lubowitz Run, Sidmouth, HI 90646-5543

Phone: +99513241752844

Job: Design Supervisor

Hobby: Digital arts, Lacemaking, Air sports, Running, Scouting, Shooting, Puzzles

Introduction: My name is Delena Feil, I am a clean, splendid, calm, fancy, jolly, bright, faithful person who loves writing and wants to share my knowledge and understanding with you.