Sunday, July 19, 2009

OraInventory Information:

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 with the newer releases of OUI (2.x and higher):

The inventory in the ORACLE_HOME (Local Inventory)
The central inventory directory outside the ORACLE_HOME (Global Inventory)

At startup, the Oracle Universal Installer first looks for the key (oraInst.loc) that specifies where the global

inventory is located at


this key is platform dependant


/var/opt/oracle/oraInst.loc ( Solaris )

/etc/oraInst.loc ( AIX and Linux )

HKEY_LOCAL_MACHINE -> Software -> Oracle -> INST_LOC ( Windows )

If this key is found, the directory within it will be used as the global inventory location.

If the key is not found, the inventory path will default created as follows:

UNIX : $­ORACLE_BASEoraInventory
WINDOWS : c:program filesoracleInventory

If the ORACLE_BASE environment variable is not defined, the inventory is created at the same level as the first

Oracle home.
For example, if your first Oracle home is at /export/app/oracle/ORACLEHome1, then,
the inventory is at /export/app/oracle/oraInventory



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
Other non-ORACLE_HOME specific products, such as the Java Runtime Environment (JRE)

Starting with Oracle Universal Installer 2.1, the information in the Oracle Universal Installer inventory is stored

in Extensible Markup Language (XML) format.
The XML format allows for easier diagnosis of problems and faster loading of data.
Any secure information is not stored directly in the inventory. As a result, during deinstallation of some products,

you may be prompted for required secure information, such as passwords.


Local Inventory

There is one Local Inventory per ORACLE_HOME.
It is physically located inside the ORACLE_HOME at $­ORACLE_HOME/inventory
and contains the detail of the patch level for that ORACLE_HOME.

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.


Global Inventory

The Global Inventory is the part of the XML inventory that contains 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.
The Global Inventory records the physical location of Oracle products installed on the machine,
such as ORACLE_HOMES (RDBMS and IAS) or JRE.
It does not have any information about the detail of patches applied to each ORACLE_HOMEs.
The Global Inventory gets updated every time you install or de-install an ORACLE_HOME on the machine, be it through

OUI Installer, Rapid Install, or Rapid Clone.

Note: If you need to delete an ORACLE_HOME, you should always do it through the OUI de-installer in order to keep the

Global Inventory synchronized.

OUI 2.x (11.5.7 and later):

Global inventory becomes a list of pointers to each Local Inventory
Global and local inventories are in text based XML format
XML conversion is validated and performed if needed by Rapid Clone

Prior to 2.x ( 11.5.5 or aerlier )
Global inventory was in binary format
Global inventory contained all software install information
No local inventories in ORACLE_HOMEs



oraInst.loc file may be in different locations, depending on system platform:

/var/opt/oracle/oraInst.loc file
or
/etc/oraInst.loc

---file contents---
inventory_loc=/u01/oracle/oraInventory
inst_group=oinstall
---file contents---


Required permissions for oraInst.loc

chmod 644 /var/opt/oracle/oraInst.loc



oraInst.loc contain path information to the Oracle central(also called global) Inventory directory and
group of the software owner which can be dba or oinstll as created on the system:
That is why group name should be same eg: dba for database user eg: oracle and application user eg: applmgr
as application side oracle_homes are alos registered in Global inventory.

Example:
inventory_loc=/app/oracle/product/10.2/oraInventory
inst_group=dba


Global Inventory holds information about Oracle Products on a Machine and local inventory withing the software home

hold information about that software.

To recreate lobal oraInventory content if corrrupted or missing can be done suing runInstaller or from perl script

OUIsetup.pl as shown below:

From runInstaller:

cd $ORACLE_HOME/oui/bin
./runInstaller -silent -attachHome ORACLE_HOME="/u01/oracle/product/10.1.2" ORACLE_HOME_NAME="Ora10gHome"


Note: The information of ORACLE_HOME and its name to be attached in central inventory can be obtained from the

inventory.xml file present withing local inventory.


After this check if inventory information can be listed with below command:

$ORACLE_HOME/OPatch/opatch lsinventory -detail


Also can do these verifications,

View the file /ContentsXML/inventory.xml
The ORACLE_HOME_NAME will be mentioned against the location of ORACLE_HOME

For Example
HOME NAME="OraDB10g_Home" LOC="/u01/home/oracle/product/10.2/db_1" TYPE="O" IDX="1"

Here the ORACLE_HOME_NAME is OraDB10g_Home


Invoke the runInstaller inside $ORACLE_HOME/oui/bin
Select Installed Products

1. Contents
The products (ORACLE_HOME_NAME) installed will be displayed
Put a check mark on the ORACLE_HOME_NAME and its location will be displayed

2. Environment
The installed ORACLE_HOME_NAME along with Home Path will be displayed.


To create global invetory from perl script OUIsetup.pl:

. Download Patch 5035661 (OUI 2.2) (Or Later) from Metalink.

Note:
Do not follow the readme.txt file for this patch.
Just follow the instructions on this Note.

Recreate the Global oraInventory on ALL the ORACLE_HOMEs as follows :

1) iAS ORACLE_HOME :

a. Unzip the patch into the directory
ie: unzip -od p5035661_11i_LINUX.zip

b. Source the Apps environment file (/APPSORA.env).
If the environment file is not available, please make sure
the environment variable 'APPL_TOP' is set.

c. Change directory to the /appsoui/setup

d. Execute the perl script OUIsetup.pl:
perl OUIsetup.pl

This command, will create a new oraInventory (on the location where
the oraInst.loc is pointing to) and will add one entry on the file
oraInventory/ContentsXML/inventory.xml for the iAS ORACLE_HOME
just registered.

e. Give all the Permissions to the new oraInventory create in order to
prevent permission problems that might occur during the registration
of the the next ORACLE_HOME (ie: 8i or 9i).

For Example :
cd /
chmod -R 777 oraInventory

2) RDBMS ORACLE_HOME (8i or 9i)

a. Unzip the patch into the directory
ie: unzip -od p5035661_11i_LINUX.zip

b. Source the DB environment file (/_.env)
If the environment file is not available, please make sure
the environment variable 'ORACLE_SID' is set.

c. Change directory to the /appsoui/setup

d. Execute the perl script OUIsetup.pl:
perl OUIsetup.pl

This command, will use the same oraInventory created on Step 4.1, and
will add another entry on the file oraInventory/ContentsXML/inventory.xml
for the RDBMS (8i or 9i) ORACLE_HOME just registered.


Verify oraInventory registration :

- Set the DISPLAY correctly

- Go to the directory $ORACLE_HOME/appsoui/oui/install

- Execute the command : runInstaller.sh

- Click on the button 'Installed Products'

- If you are able to see all the ORACLE_HOMEs and the products installed
on each one, then the Registration was succesfull.



If the Local Inventory is missing or corrupted, then a valid workaround is to
Re-Install the Techstack by using 'rapidwiz -techstack'.
That procedure will create a a New $ORACLE_HOME (9i or iAS) containing a valid
Local Inventory.

For detailed steps on that procedure, refer to the following Metalink notes:
Note 289786.1 : 11.5.10 Oracle applications Installation Manual' (Chapter 5, Page 5-1) and
Note 146468.1 : Installing Oracle9i Application Server 1.0.2.2.2 with Oracle Applications

Re-install would be easier.
Take cold backup.
remove the inventory pointer file.
remove the /xxx/app/oracle/product/9.2.0/* files and directories (save
tnsnames.ora, sqlnet.ora, and listener.ora if they are in normal position and see $ORACLE_HOME/cpu/. for which cpu

pathces were applied and $ORACLE_HOME/.patch_storage for which opatches are applied).

setenv ORACLE_HOME, ORACLE _SID, etc. and install, then apply patchset and CPU's to bring it back to where it was.

No comments: