Friday, September 11, 2009

Steps To Recreate Central Inventory(oraInventory) In RDBMS

Opatch error
Stderr output:
    /instance/oracle/product/102/lib//libcore10.a(lcd.o)(.text+0xb71): In function `lcdprm':
    : warning: the `gets' function is dangerous and should not be used.
         Make Action done
    OPatch was able to restore your system. Look at log file and timestamp of each file to make sure
    your system is in the state prior to applying the patch.
    The following warnings have occurred during OPatch execution:
    1) OUI-67124:Inventory check failed: Patch ID 6258480 is NOT registered in Oracle Home inventory.
    OPatch failed with error code 73

In cases where the OraInventory is missing or otherwise corrupt, recreate the oraInventory directory on UNIX systems using the following steps. In a normal installation, there is a Global Inventory ($ORACLE_BASE/OraInventory) and a Local Inventory ($ORACLE_HOME/inventory).

   1. Locate the oraInst.loc file, which may be in different locations, depending on your system:

            /var/opt/oracle/oraInst.loc file

   2. Modify the file oraInst.loc file:

            cp /var/opt/oracle/oraInst.loc /var/opt/oracle/oraInst.loc.bak
            mkdir /u01/oracle/oraInventory

            ---file contents---
            ---file contents---

   3. Change the permissions to be appropriate, (using your directory location):

            chmod 644 /var/opt/oracle/oraInst.loc

   4. For consistency, copy the file to Oracle home directory, (using your directory location):

      cp $ORACLE_HOME/oraInst.loc $ORACLE_HOME/oraInst.loc.bak
      cp /var/opt/oracle/oraInst.loc $ORACLE_HOME/oraInst.loc

   5. Run Oracle Universal Installer from your Oracle home as below:

      cd $ORACLE_HOME/oui/bin
      ./runInstaller -silent -attachHome ORACLE_HOME="/u01/oracle/product/10.1.2" ORACLE_HOME_NAME="Ora10gHome"

   6. Check the inventory output is correct for your Oracle home:

            $ORACLE_HOME/OPatch/opatch lsinventory -detail

   7. If the table at the beginning of the output is showing the proper directories, and the Oracle home components are properly reflected in the details, then the Global Inventory (in $ORACLE_BASE) has been successfully created from the Local Inventory, (in $ORACLE_HOME). At this time, you may patch and maintain your Oracle home, as normal.

No comments: