FAQs on Central Inventory and Oracle Home Inventory (Local Inventory) in Oracle RDBMS

FAQs on Central Inventory and Oracle Home Inventory (Local Inventory) in Oracle RDBMS
(Doc ID 564192.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 9.2.0.1 to 12.1.0.1 [Release 9.2 to 12.1]
Information in this document applies to any platform.

PURPOSE

This note explains about the frequently asked questions related to Central/OraInventory and Local Inventory in Oracle RDBMS.

QUESTIONS AND ANSWERS

The Oracle Universal Installer inventory stores information about all Oracle software products installed in all the Oracle Homes on a host, provided the product was installed using Oracle Universal Installer.
The inventory is organized as follows:

Central Inventory (oraInventory)
Local Inventory (Oracle Home inventory)

CENTRAL INVENTORY

What is the Central Inventory? (oraInventory)

  • The Central Inventory contains the information related to all Oracle products installed on a host.
  • Each Central Inventory consists of a file called inventory.xml, which lists all the Oracle Homes installed on the node.
  • For each Oracle Home, it also lists the Oracle Home name, home index, and nodes on which the home is installed.
  •  It also mentions if the home is an Oracle Clusterware home or a removed Oracle Home.
    This file is present in the following location:
    /ContentsXML/inventory.xml
    (In windows the location is C:\Program Files\Oracle\Inventory\ContentsXML\inventory.xml by default)


What is the Central Inventory Pointer File

  • Every Oracle software installation has an associated Central Inventory where the details of all the Oracle products installed on a host are registered.
  • The Central Inventory is located in the directory that the inventory pointer file specifies.

    The following list shows the location (by default) of the inventory pointer file for various platforms:
    Linux And AIX — /etc/oraInst.loc
    Other Unix Platforms — /var/opt/oracle/oraInst.loc 

    Windows — The pointer is located in the registry key:
    \\HKEY_LOCAL_MACHINE\\Software\Oracle\inst.loc


    The following string shows an example of the path for the oraInst.loc file:
    inventory_loc=/home/oracle_db11g/product/11.1.0/db_1/oraInventory
    inst_group=oracle

Can you keep different Central Inventory for each Oracle software installation?

On UNIX / Linux platforms, you can have a different Central Inventory for each Oracle software installation if you want to keep each Oracle software installation unknown to another Oracle software installation. 
On Windows platforms, you can not have multiple Central Inventory locations.

Advantages and disadvantages of keeping a Central Inventory for each Oracle Home and shared Central Inventory:

Advantages of cental Inventory for each Oracle Home
1) Recreation of Central Inventory will be easy as doing "attachhome" is required only once. (Only applicable to 10.2 onwards.)
2) Corruption of the Central Inventory will only affect the particular Oracle Home
3) Inventory operations on multiple Oracle Homes can be done in parallel.

Disadvantages of Central Inventory for each Oracle Home 1) Each Central Inventory requires a separate inventory pointer or editing of the inventory pointer is required.
2) Identifying the Central Inventory and mapping it with the the correct Oracle Home may become difficult.

Advantages of a shared Central Inventory
1) Only one inventory pointer is required.
2) Easy to identify and map the Oracle Home(s)

Disadvantages of a shared Central Inventory
1) Recreation of the Central Inventory may take more time.
2) Corruption of the Central Inventory will affect all the Oracle Homes.
3) The operations on the Central Inventory are performed through a locking mechanism.
This implies that when an operation such as installation, upgrade, or patching occurs on an Oracle Home, these operations become blocked on other Oracle Homes that share the same Central Inventory.
So Inventory operations on multiple Oracle Homes cannot be done in parallel.

How to start the OUI/Opatch if the oraInst.loc file is not in the default location? ( Unix)

On UNIX, if you do not want to use the Central Inventory located in the directory specified by the inventory pointer file, you can use the -invPtrLoc flag to specify another inventory pointer file.
The syntax is as follows:

./runInstaller -invPtrLoc
./opatch -invPtrLoc

NOTE : If the contents of the oraInst.loc file is empty, Oracle Universal Installer prompts you to create a new inventory.  This will create a new central inventory for this newly installed ORACLE_HOME.

Can you remove or manually edit the inventory.xml file?

  • No. Oracle recommends that you do not remove or manually edit this file as it could affect installation and patching.
  • OUI lists all the Oracle Homes installed on the node using the inventory.xml file. So if the inventory.xml file is edited, this may lead to inventory corruption.

    NOTE : Removing or manually editing ANY file in the oraInventory directory is not supported by Oracle.

You have lost/corrupted the Central Inventory but have a valid Oracle Home(s). What do you do?

Oracle RDBMS 9.2.0.x..x and 10.1.0.x.x
============================
In Oracle 9.2 / 10.1 you can restore the Central Inventory from backup or you can clone the Oracle Home(s) from an identical installation.

Oracle RDBMS 10.2.0.x..x and 11.1.x.x.x
===================================
Oracle Universal Installer allows you to set up the Central Inventory or register an existing ORACLE_HOME with the Central Inventory corruption or loss. You need to execute the command with the -attachHome flag from $ORACLE_HOME/oui/bin.

Refer Metalink Note 556834.1 Steps To Recreate Central Inventory (oraInventory) In RDBMS Homes

How can you remove the Central Inventory after all the Oracle Homes on a host are removed?

Refer Metalink Note 473373.1 How To Remove The Central Inventory After All The Oracle Homes Are Removed?

Can you use the jar command to backup inventory/Oracle Home?

Do not use the jar command to zip the Oracle Home, as this causes the file permissions to become lost.

How can you attach and detach Oracle Homes from the Central Inventory ?

Refer Metalink Note 458893.1 Oracle Universal Installer (OUI) FAQ

Does the database work without a Central/Local Inventory?

Yes, the database continues to work without a Central/Local Inventory.
However, you will not be able to do any operations using OUI/Opatch on tha Oracle Home (ie upgrade, patching, etc ...)

What are the permissions/ownership required for a Central Inventory?

The permissions required for Central Inventory are 755 (rwxr-xr-x)
Central Inventory should be owned by the owner of the Oracle installations.


Can you move the Central Inventory (oraInventory) to another location?

Yes, you can move the Central Inventory (oraInventory) to another location on UNIX
Refer Metalink Note 299260.1 How To Move The Central Inventory To Another Location

Does Oracle Support Manually Changing "inst_loc" In The Windows Registry?

Manually changing the "inst_loc" string in the Windows registry (under HKEY_LOCAL_MACHINE\Software\Oracle or HKLM\Software\Oracle) is officially unsupported.
Refer Metalink Note 552502.1 Support For Manually Changing "inst_loc" In The Windows Registry

LOCAL INVENTORY


What is the Local Inventory ?

  • Oracle Home Inventory or Local Inventory is present inside each Oracle Home.
  • It only contains information relevant to a particular Oracle Home.
    It is located in the following location:
                               $ORACLE_HOME/inventory

What are the Contents of the Local Inventory ?

Components File
  • This file contains the details about third-party applications like Java Runtime Environment (JRE) required by different Java-based Oracle tools and components.
  • In addition, it also contains details of all the components as well as patchsets or interim patches installed in the Oracle Home.
    This file is located here:
    ORACLE_HOME/inventory/ContentsXML/comps.xml

Home Properties File
  • This file contains the details about the node list, the local node name, and the CRS flag for the Oracle Home.
  • In a shared Oracle Home, the local node information is not present.
  • This file also contains the following information:
    GUID — Unique global ID for the Oracle Home
    ARU ID — Unique platform ID. The patching and patchset application depends on this ID.
    ARU ID DESCRIPTION — Platform description

    NOTE : The information in oraclehomeproperties.xml overrides the information in inventory.xml. This file is located here:
Other folders
Folder NameDescription
ScriptsContains the scripts used for the cloning operation
ContentsXMLContains the details of the components and libraries installed
TemplatesContains the template files used for cloning.
oneoffsContains the details of the one-off patches applied


You have lost the Oracle Home (local) Inventory. What can you do?

* Oracle recommends backing up the inventory when an Oracle Home is installed or removed.
* Ensure that you back up the comps.xml having the latest time stamp.
* When your Oracle Home Inventory is corrupted or lost, you can restore from backup or you can re-install the Oracle Home. (Note: When restoring from backup you must make sure that the backup is from a time after the last patch/patchset was installed. Failure to heed this step can lead to missing patches/patchsets not being listed in the inventory)
* Rebuilding the Oracle Home inventory is not possible
NOTE : Manually editing ANY files in the inventory directory is not supported by Oracle.

What are the permissions/ownership required for a Local Inventory?

The permissions required for Local Inventory are 755 (rwxr-xr-x).

How to check if the inventory.xml/comps.xml or any Oracle XML file is correct using Opatch?

Refer Metalink Note 453399.1 How To Check The inventory.xml/comps.xml Or Any Oracle XML File Is Correct ? (In most cases, the syntax check done the way mentioned in the note should be fine.)

How can you Clean the inventory after deleting the Oracle Home manually?

Refer Metalink Note 435219.1 How To Clean Up The Inventory After Deleting The Oracle Home Manually Using OS Commands("rm-rf " or other)?

REFERENCES

NOTE:453399.1 - How To Check if inventory.xml/comps.xml Or Any Oracle XML File Is Correct?
NOTE:299260.1 - How To Move The Central Inventory To Another Location
NOTE:458893.1 - Oracle Universal Installer (OUI) FAQ
NOTE:473373.1 - How To Remove The Central Inventory After All The Oracle Homes Are Removed ?
NOTE:556834.1 - Steps To Recreate Central Inventory(oraInventory) In RDBMS Homes
NOTE:552502.1 - Support For Manually Changing "inst_loc" In The Windows Registry

===============================================================



Things to Backup Before Patching CRS Home (Doc ID 743036.1)




GOAL

What should you backup before patching CRS Home?

FIX

If you want to apply patchset or patches to CRS Home, it is recommended to take backup of existing installation in case you need to restore.

Please make the backup of the following:

1.  Backup CRS_HOME -- you can use cpio, tar OS utilities.
2.  Backup central inventory -- you can get the location via file /etc/oraInst.loc or /var/opt/oracle/oraInst.loc.
3.  Backup /etc/oracle directory.
4.  Backup /var/opt/oracle directory.
5.  Export ocr by issuing "ocrconfig -export ".
6.  Export the voting disk by issuing "dd if=voting_disk_name of=backup_file_name".

======================================================================

Comments

  1. HomeZada provides a single online application to manage all the digital records of your home.

    ReplyDelete
  2. This is helpful, Thank you.. It answered many of my questions :)

    ReplyDelete
  3. Excellent to be visiting your blog again, it has been months for me. Rightly, this article that I've been served for therefore long. I want this article to finish my assignment within the faculty, and it has the same topic together with your article. Thanks for the ton of valuable help, nice share. spicewood tx custom pool builder

    ReplyDelete

Post a Comment

Oracle DBA Information