Question: I lost my oraInventory files. How can
I re-create the inventory for my Oracle installation?
Answer:
Oracle Universal Installer enables you to set up the Central
Inventory or register an existing oracle_home with the Central
Inventory in case of inventory corruption or loss.
You need to execute the command with the -attachHome
flag.
With Oracle Universal Installer (OUI), you can set the Central
Inventory up on a clean host. You can also register an
existing Oracle home with the Central Inventory when it becomes
corrupted or lost.
OUI will create the Central Inventory if it does not already
exist. It will put it in the location specified by the
oraInst.loc file.
RAC
The syntax for a RAC environments is as follows:
./runInstaller -silent
-attachHome oracle_home="<oracle_home_location>"
"cluster_nodes={<node1, node2>}"
local_node="<node_name>"
The following session variables are also available:
If the cluster_nodes session variable is not
passed in a cluster environment, OUI will take it from the following
file:
$oracle_home/inventory/ContentsXML/oraclehomeproperties.xml
If the local_node session variable is not passed,
OUI takes it from the following file:
$oracle_home/inventory/ContentsXML/oraclehomeproperties.xml
If an entry is not found there, it takes it from the Oracle
Clusterware stack.
If it is not able to find it in the stack, the first node
of the cluster_nodes is taken as the local_node.
The remote_nodes variable can be passed to specify the list
of remote nodes.
To set the Central Inventory up in the local node, the -local
flag will be passed, and the remote_nodes variable will be
left empty. The Oracle standard syntax is:
./runInstaller -silent
-attachHome -invPtrLoc ./oraInst.loc
oracle_home="<oracle_home_location>"
"remote_nodes={}" -local
Using the -local flag, causes the action to be performed
on the local node without regard to the cluster nodes specified.
Non-RAC
For a non-RAC setup, it is not necessary to pass the
local_node variable, and the cluster_nodes variable
remains empty.
The Oracle standard syntax for non-RAC is:
./runInstaller -silent
-attachHome -invPtrLoc ./oraInst.loc
oracle_home="<oracle_home_location>"
"cluster_nodes={}"
Again, the -local flag can be used to attach the local
Oracle home. The -cfs flag should be used with a shared
Oracle home with the -local flag. This way the local node
information will not be populated inside a shared Oracle home.
After the Oracle home has been attached, the success of the
operation can be verified by verifying the contents of the log file
present in the
<central_inventory>/logs
directory.
It is also possible to view the contents of the inventory.xml
file to verify the Oracle home is registered. The
inventory.xml file can be found in the
<central_inventory>/contentsXML
directory.