A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

What is Global and Local Inventory in Oracle?

2 min read
Overview of Inventory:

The inventory is a very important part of the Oracle Universal Installer. This is where OUI keeps all information regarding the products installed on a specific machine.

There are two inventories :

1. The inventory in the ORACLE_HOME (Local Inventory)

2. The central inventory directory outside the ORACLE_HOME (Global Inventory)
At startup, the Oracle Universal Installer first looks for the key that specifies where the global inventory is located .

* /var/opt/oracle/oraInst.loc (typical)
* /etc/oraInst.loc (AIX and Linux)
* HKEY_LOCAL_MACHINE -> Software -> Oracle -> INST_LOC (Windows platforms)
About the Oracle Universal Installer Inventory:

The Oracle Universal Installer inventory is the location for the Oracle Universal Installer's bookkeeping. The inventory stores information about:

* All Oracle software products installed in all Oracle homes on a machine.
Local Inventory: 

There is one Local Inventory per ORACLE_HOME. 

1) It stores the collection of information representing the software installed.

2) It is physically located inside the ORACLE_HOME at $ORACLE_HOME/inventory and contains the detail of the patch level for that ORACLE_HOME.

3) The Local Inventory gets updated whenever a patch is applied to the ORACLE_HOME, using OUI.

If the Local Inventory becomes corrupt or is lost, this is very difficult to recover, and may result in having to reinstall the ORACLE_HOME and re-apply all patchsets and patches.
Default Location Inventory Pointer:


 Linux/AIX : /etc/oraInst.loc

cat oraInst.loc

inventory_loc=/u01/app/oraInventory
inst_group=oinstall
Central Inventory:

1) Inventory having information of Oracle Homes installed in a machine.

It Contains:

 * Inventory File
 * Logs Directory

2)  Updated by install or de-install of a ORACLE_HOME.
Inventory File(inventory.xml)

It is Located in :

<centralinventorylocation>/ContentsXML/inventory.xml

It Lists Oracle_Home with following attributes:
HOME IDX="1“ LOC="/u01/app/oracle/product/11.2.0/dbhome_1"
NAME="OraDb11g_home1“
HOME NAME=“grid11g" LOC="/grid11g" IDX=“2" CRS="true"
NODE NAME="rac1" NODE NAME="rac2"
Inventory Corrections examples :

Attach Oracle_Home to Central Inventory :

./runInstaller -silent -attachHome
ORACLE_HOME="<OracleHome-Directory>“
ORACLE_HOME_NAME="<OracleHome-Name>“

Detach Oracle_Home from Central Inventory :

./runInstaller -silent -detachHome
ORACLE_HOME="<OracleHome-Directory>“
ORACLE_HOME_NAME="<OracleHome-Nam
Check Oracle XML Is Correct ?

We can use opatch utility to check health of specific XML file.
%opatch util LoadXML -xmlInput
inventory_Loc/ContentsXML/inventory.xml
Global Inventory

The Global Inventory is the part of the XML inventory that contains:

1) The high level list of all oracle products installed on a machine. There should therefore be only one per machine. Its location is defined by the content of oraInst.loc.

2) The Global Inventory records the physical location of Oracle products installed on the machine.

3) It does not have any information about the detail of patches applied to each ORACLE_HOMEs.

4) The Global Inventory gets updated every time you install or de-install an ORACLE_HOME on the machine, be it through OUI Installer.