Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Wednesday, November 7, 2007

ORAINST environment variable, invPtrLoc and oraInst.loc

Oracle keeps its inventory of installed products in a directory.

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.Any modification to the central Inventory should be done through OUI and it is not allowed or a supported method to manually modify the Central Inventory at any point of time. There are various other files associated with the central inventory so manually deleting the contents oraInventory directory and overwritting it leaves the database in an unstable state and may result in corruption of inventory. Every Installation and deinstallation through OUI updates the inventory.xml file as well as corresponding Oracle home comps.xml files hence manipulating manually the contents of oraInventory directory doesn't really help the cause and failes to update corresponding files associated with central Inventories.

The location of the oraInventory is determined by the contents of the /etc/oraInst.loc (AIX and Linux Platform) or /var/opt/oracle/OraInst.loc (Solaris and HP-UX platform). If the default oraInst.loc does not exist under /etc or /var/opt/oracle or it is not pointing to central inventory where Oracle Home is registered then we have to specify the oraInst.loc location with the help of invPtrLoc switch or ORAINST environment variable.

For Example:-

./runInstaller -invPtrLoc

opatch lsinventory -invPtrLoc

OR

1. Set the evironment variable ORAINST to the full path of oraInst.loc including the file name
itself:
ORAINST = /var/opt/oraInst.loc
export ORAINST

2. echo $ORAINST to verify it is set correctly.

You may get errors like those described in metalink note 384260.1 if the inventory is not set correctly:

Your ORACLE_HOME is /u01/applgld1/gld1ora/iAS
Your ORAINST is /tmp
Your JDK_HOME is /u01/applgld1/gld1ora/iAS/Apache/jdk
If these are correct, press Y to continue [N] => Y
Checking the inventory for Component oracle.apache.apache 1.3.19.0.0a
oracle.sysman.oii.oiii.OiiiInventoryDoesNotExistException: No install inventory
exists on this machine.
at
oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(OiiiInstallAreaControl.java:1669)
at
oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:257)
at
oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:216)
at
oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:165)
at Precheck.(Precheck.java:126)
at Precheck.main(Precheck.java:62)
Checking the inventory please wait for a while....

This may take few seconds......

java.lang.NullPointerException
at Precheck.getInventoryDetails(Precheck.java:172)
at Precheck.main(Precheck.java:71)
java.lang.NullPointerException
at Precheck.tokenize(Precheck.java:216)
at Precheck.main(Precheck.java:72)

5 comments:

Anonymous said...

Thanks for the info... helped resolving a DB Patch instalation issue.
BTW, the ownership of /etc/oraInst.loc should be oracle oinstall. My problem was because root was the owner, and the oracle user could not read that file.
su -
chown oracle:oinstall /etc/oraInst.loc
chmod 664 /etc/oraInst.loc

Anonymous said...

I have tried this parameter and it did not work for me on linux machine. So i copied the oraInst.loc file to /etc and it worked

I also could not find this parameter in metalink.

Vikram Das said...

Hi Anonymous,

This parameter is described in Metalink notes 454443.1, 562699.1, 263151.1 and many more notes. If you search for invptrloc, you'll get lot of hits.

- Vikram

Unknown said...

thanks for the help. this artical helped me with the opatch lsinventory -invPtrLoc parameter

Bolisetty Vijju said...

Thanks alot bro!!