Oracle Inventory -> complete reference and troubleshooting guide for the new oracle DBA





As a  new oracle DBA you might have questions like what is oracle inventory? what can i do if my oracle inventory location is corrupted? Can i have more than one oracle inventory location on my  server?

Below discussion contains detailed explanation and answers for the above questions.

What is oraInventory ?
oraInventory is repository (directory) which store/records oracle software products & their oracle_homes location on a machine. This Inventory now a days in XML format and called as XML Inventory where as in past it used to be in binary format & called as binary Inventory.
There are basically two kind of Inventory Global Inventory (also called as Central Inventory) and Local Inventory also called as Oracle Home Inventory.

Inventory is a directory structure that lists what Oracle products/versions you have installed.

Global Inventory ?
Global Inventory holds information about Oracle Products on a Machine. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms & reports or discoverer server . This global Inventory location will be determined by file oraInst.loc in /etc (on Linux) or /var/opt/oracle (solaris). If you want to see list of oracle products on machine check for file inventory.xml under ContentsXML in oraInventory (Please note if you have multiple global Inventory on machine check all oraInventory directories)

Local Inventory
Inventory inside each Oracle Home is called as local Inventory or oracle_home Inventory. This Inventory holds information to that oracle_home only.

Can I have multiple Global Inventory on a machine ?
Quite common questions is that can you have multiple global Inventory and answer is YES you can have multiple global Inventory but if your upgrading or applying patch then change Inventory Pointer oraInst.loc to respective location. If you are following single global Inventory and if you wish to uninstall any software then remove it from Global Inventory as well.

What to do if my Global Inventory is corrupted ?
No need to worry if your global Inventory is corrupted, you can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option
-attachHome

./runInstaller -silent -attachHome -invPtrLoc $location_to_oraInst.loc
ORACLE_HOME="Oracle_Home_Location" ORACLE_HOME_NAME="Oracle_Home_Name"
CLUSTER_NODES="{}"

Do I need to worry about oraInventory during oracle Apps 11i cloning ?
No, Rapid Clone will update both Global & Local Inventory with required information , you don’t have to worry about Inventory during Oracle Apps 11i cloning.

verified that inventory exists with runInstaller/show installed products

The other set of files created during install is the Oracle Inventory, found according to the OFA in /u01/app/oracle/oraInventory. The Inventory is used by the Oracle Universal Installer to record what products have been installed, where the were installed, and how. The Oracle Inventory doesn’t impact databases in any way and only impacts the installer. You can see a list of all the products and options you have installed in the oraInventory/Components directory.

So you can give read/write/update rights to the new user to the inventory directory.

In addition to the two options as above suggested, I would say you have a third option:
3. rename the file: /etc/oraInst.loc, and allow the Oracle10 installer to create a new one.

We use this option for two separate Oracle_homes on a single Red Hat machine, each owned by two different Linux users.  Our two Oracle_homes are both the same version of Oracle, but this allows us to have two different Oracle SGAs that are both close to 2GB on a 32-bit server that has 8GB of RAM.

If you need to have two different versions of Oracle in Same machine,it is always good to have differet inventories to go for a patch upgrade or uninstalltation in future.

Follow the way what sridhar had told you, you need to change the orainst.loc For you 10g Installation.

You can have a seperate  lstnr in 10g for both and Have it run it diff ports.

You need to turn off your 9i listner if you ned to use the same port in 10g listener.

Oracle always checks /etc/OraInst.loc if you run your installer.If a enrty is already found,iit tries to use the same,if the permissions are not there you need to Grant permission for inventory.

Note : When you do any patch upgrade for diff home,remember to change the inventory as per the home you upgrade

Yes, you can easily have two different listeners (we do).  Just specify a different port (like 1522, instead of the default port of: 1521) for the second listener.  The second listener must also be named something other than the default value: "LISTENER".  This means that whenever you want to start or stop the second listener, you cannot simply do: "lsnrctl stop" or "lsnrctl start", you must also include the listener name as the thrid keyword in those commands.

I am trying to install Oracle 9i but I keep getting the error "Inventory location is invalid" just after the Univeral Installer is openned. Could anyone advise on this? Thanks in advance

If Windows:

Go to start – run and type regedit.
Go to the first line at the top.
Click Edit – find – and then type INST_LOC
My INST_LOC location is pointing to : C:\Program Files\Oracle\Inventory.  If this is not the right location, change it by double clicking and modifying the "value data", and then close the regedit window.  Try again, if not, try rebooting and try again.

If unix based:

Be sure that the user you are installing the oracle product is in the dba group.  If not talk with your System Admin so that the user you using to enter the unix server is in the dba group.
Or try changing the group yourself, and see if you can do it:

chgrp -R <correct group> <full path>/oraInventory

See an example in out Company:

mapdev(oracle)#ls -lt
total 6
-rw-rw-r–   1 oracle   dba          830 Feb 24  2005 oratab
-rw-rw-r–   1 oracle   dba          796 Jul  6  2004 oratab.oem
-rw-r–r–   1 root     other         66 Mar 25  2004 oraInst.loc—————–> This is located in /var/opt/oracle, maybe yours is in the /etc/oraInst.loc .

mapdev(oracle)#more oraInst.loc
inventory_loc=/export/home/oracle/app/oraInventory
inst_group=dba
mapdev(oracle)#cd /export/home/oracle/app/
mapdev(oracle)#ls -lt
total 2
drwxr-xr-x   8 oracle   dba          512 Feb 24  2005 oraInventory——–> See, it reads dba as the group and oracle is the user I use to install.

*********************************************

I think I have discovered a possible solution.

Oracle_Inventory: /u01/app/oracle/product/9.2.0.1/oraInventory/

ORACLE_BASE: /u01/app/oracle/product/9.2.0.1/
ORACLE_HOME: /u01/app/oracle/product/9.2.0.1/home/

This will keep everything from a release in one directory.  The ORACLE_HOME is located under the ORACLE_BASE.  The Oracle inventories of each release will be independent and autonomous from one another.  And when I am finished upgrading all my databases to a new version, I can just delete the files related to an order release of the software.

Sounds like a plan….huh?  😉

 

I have Oracle 9i installed on a Solaris 10 box and I need to install Oracle 10g. I understand that they can both co-exist. For the 9i install the Oracle_Home, Oracle_Base and Oracle_Inventory were all set up and installed under the /u01/app/oracle directory. Under this scenario, can I install Oracle 10g keeping Oracle_Base and Oracle_Inventory under /u01/app/oracle and Oracle_Home under /u01/app/oracle10g, without compromising the existing Oracle 9i installation?

 

Yes, you will want to leave $ORACLE_BASE as it is defined and also leave the oraInventory under this location, as is the default for Unix-based operating systems. Your installation of Oracle 10g will update information in oraInventory, which is the global inventory for that server. You will also notice further inventory information under each respective $ORACLE_HOME. This contains information about the specific components and patches installed for each $ORACLE_HOME. The global inventory located under $ORACLE_BASE will contain more general information about all Oracle installations.

I have been trying to do the following all afternoon:

  • Install 10.2.0.1
  • Install timezonepatch required prior to installing patchset 10.2.0.3
  • Install patchset 10.2.0.3
  • Install the April 2007 critical patch for 10.2.0.3

However, I keep getting strange errors when I am in the process of installing 10.2.0.1 and it prompts me to run two scripts, orainstRoot.sh and root.sh as the user root. After I run the scripts and click okay I get an error, "OUI-10058: The OUI Inventory on this system does not exist or is not writable. 1-the /opt/oracle/oraInventory/orainstRoot.sh script was not executed with root privileges, or an error occurred during execution; 2-You are not a member of the specified installer group."

So I run it again and click okay and then everything appears fine. The screen says installation successful. Then I try to install the 10.2.0.3 patchset and I get another error saying that the oraInventory has files in it and can’t be written to and that I have to choose another directory. The first time I ran into this problem I chose a different directory. However, when I tried to apply the latest critical patch, Apr 2007, I got an error regarding the orainst.loc. So I blew away that installation. The second time this happened I deleted the contents from the oraInventory directory and it completed the installation. But when I ran the Apr 2007 script I had the same error. I don’t know how to fix this.

This is a permissions issue with the inventory. A new inventory was created with the initial installation of Oacle 10.2.0.1 but it has not been registered yet preventing you from applying further patches and patch sets.

You will probably want to delete the installation and inventory (as well as the oraInst.loc file which is located in either /etc or /var/opt/oracle depending on the operating system). Ensure that the umask setting for the oracle user is set to 0022. This means permissions for directories will be 755 and for files it will be 644. Install 10.2.0.1 and run the orainstRoot.sh as root … do not sudo to root and run the script. After running the script, check the permissions of the oraInst.loc file. The permissions should be as follows:

ls -l /etc/oraInst.loc
-rw-r--r-- 1 root root 61 Apr 23 02:15 /etc/oraInst.loc

You should now be able to apply any subsequent patches and patch sets.

Author: admin