Wednesday, July 6, 2011

How to Recreate the OraInventory on UNIX Systems

How can I recreate the OraInventory  if it gets  removed
  1. Locate the oraInst.loc file, which may be in different locations, depending on your system
    /var/opt/oracle/oraInst.loc file
    or
    /etc/oraInst.loc
  2. Modify the file oraInst.loc file
    cp /etc/oraInst.loc /etc/oraInst.loc.bak     #e.x for AIX run with rot

    mkdir /data1/oracle2/oraInventory          #path is examp.Change it .run with oracle owner user
  3. Change oraInst.loc
    inventory_loc=/data1/oracle2/oraInventory

    inst_group=oinstall #it can be also dba
  4. Change the permissions
    chmod 644 /etc/oraInst.loc
  5. For consistency, copy the file to Oracle home directory, (using your directory location):

    cp $ORACLE_HOME/oraInst.loc $ORACLE_HOME/oraInst.loc.bak

    cp /etc/oraInst.loc                  $ORACLE_HOME/oraInst.loc
  6. Run Oracle Universal Installer from your Oracle home as below:

    cd $ORACLE_HOME/oui/bin

    ./runInstaller -silent -attachHome ORACLE_HOME="/data1/oracle2/orahome10gr2" ORACLE_HOME_NAME="PARTEST"

    Note: The -attachHome is only officially supported in 10.2 and higher. But, we found it works on our testing with 10.1.2
  7. Check the inventory output is correct for your Oracle home:
    $ORACLE_HOME/OPatch/opatch lsinventory -detail














No comments: