Thursday, September 8, 2011

oraInventory

The Oracle inventory is a important meta-data respository, which most DBAs ignore. Lose it and you will run into problems patching and keeping the clusterware sane.
CLUVY heavily depends on the oraInventory; without which you will get the olsnodes missing error.

To check the oraInventory health simple commands as below are used


$ORACLE_HOME/OPatch/opatch lsinventory



If you do endup losing the inventory or corrupting it, it can be rebuild online without taking the DB or the clusterware down.
It is recommended to detach and attach the home back and the oraInventory should be preferably kept local on each node. I would also recommend DBAs tar and save the oraInventory once in a while.
In the below example GI is the Grid home with cluterware and ASM and ORACLE_HOME the RDBMS home

The below needs to be run on each node.


export ORACLE_HOME=/apps/oracle/product/11g/db
export GI_HOME=/apps/oracle/product/11g/grid

$GI_HOME/oui/bin/runInstaller -detachHome -silent -local ORACLE_HOME=$ORACLE_HOME

$GI_HOME/oui/bin/runInstaller -silent -local -ignoreSysPrereqs -attachHome ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME='11gR2DB1' LOCAL_NODE= CLUSTER_NODES=,

$GI_HOME/oui/bin/runInstaller -silent -local -ignoreSysPrereqs -attachHome ORACLE_HOME=$GI_HOME ORACLE_HOME_NAME='11gR2GI1' LOCAL_NODE=racnode1 CLUSTER_NODES=racnode1,racnode2 CRS=true



Note GI home is the only one which should have CRS=TRUE set.

The Oracle Home names can be found under


/oraInventory/ContentsXML/inventory.xml

where is the located? Open up /var/opt/oracle/oraInst.loc
#Wed Sep 07 15:59:40 BST 2011
inst_group=oinstall
inventory_loc=/apps/oracle/home/oraInventory

No comments:

Post a Comment