Steps to re create Oracle Inventory

1)  No down time is required for recreating the global inventory (oraInventory)
2)  if you have corrupted oracle inventory or improper oracle inventory, you can rename the directory to avoid the confusion.

      mv oraInventory oraInventory_orig

Central Inventory
—————–
Central Inventory contains the information relating to all Oracle products
Installed on a host. Central inventory (oraInventory) is an inventory that
lists ORACLE_HOMEs installed in the system using the inventory.xml file.
Each central inventory consists of a file called inventory.xml, which
contains the list of Oracle Homes installed.

Local Inventory
—————
Oracle home inventory or local inventory is present inside each Oracle home.
It contains information relevant to the particular Oracle home only.
This inventory contains, among other things, a file called comps.xml,
which contains all the components  as well as patchsets or interim patches
installed in the ORACLE_HOME.

To determine where oraInventory is located

/var/opt/oracle/oraInst.loc or /etc/oraInst.loc depending upon the Platform.

Sample oraInst.loc file

/var/opt/oracle/oraInst.loc
inst_group=dba
inventory_loc=/apps/oracle/product/oraInventory

ORACLE_HOME/oraInst.loc
inst_group=dba
inventory_loc=/apps/oracle/product/oraInventory

To find the ORACLE_HOME & ORACLE_HOME_NAME

if you have oracle old inventory, then you can view from
/apps/oracle/product/oraInventory/ContentsXML/inventory.xml
you can see ORACLE_HOME & ORACLE_HOME_NAME

SAMPLE OUTPUT

<?xml version=”1.0″ standalone=”yes” ?>
<!– Copyright (c) 2009 Oracle Corporation. All rights Reserved –>
<!– Do not modify the contents of this file by hand. –>
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>10.2.0.5.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME=”orahome_102″ LOC=”/apps/oracle/product/10.2.0.2″ TYPE=”O” IDX=”1″/>
<HOME NAME=”agent10g” LOC=”/apps/oracle/product/agent10g” TYPE=”O” IDX=”2″/>
</HOME_LIST>
</INVENTORY>

Go to Oracle Universal installer location for creating Oracle Inventory
$ORACLE_HOME/oui/bin

if you have more than one Oracle product, you have to update the inventory for all the oracle home
Ex: Oracle DB home(different versions includes)
    Oracle Agent

Note: when you are running for different homes, you have run the oui in there respective home only
   
Ex: output for ORACLE_HOME(run it in $ORACLE_HOME/oui/bin)

SAMPLE OUTPUT

$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=”/apps/oracle/product/10.2.0.2″ ORACLE_HOME_NAME=”orahome_102″
Starting Oracle Universal Installer…

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.

>>> Ignoring required pre-requisite failures. Continuing…

The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /apps/oracle/product/oraInventory
‘AttachHome’ was successful.

Ex: output for AGENT_HOME(run it in $AGENT_HOME/oui/bin)

SAMPLE OUTPUT

$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME=”/apps/oracle/product/agent10g” ORACLE_HOME_NAME=”agent10g”
Starting Oracle Universal Installer…

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.

>>> Ignoring required pre-requisite failures. Continuing…

The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /apps/oracle/product/oraInventory
‘AttachHome’ was successful.

We can apply the patch by specify oracle inventory location by the below option.

— Apply the Patch with the address of the Oracle Inventory

$ opatch apply -invPtrLoc /app/oracle/oraInst.loc

$ opatch lsinventory -invPtrLoc /app/oracle/oraInst.loc

  • October 15, 2017 | 22 views
  • Comments