Friday, 16 December 2011

Attach ORACLE_HOME

cd $ORACLE_HOME/OPatch
echo $PATH
export PATH=$PATH:$ORACLE_HOME/OPatch

 which opatch
~/product/10.2.0/OPatch/opatch

OPatch]$ opatch lsinventory
Invoking OPatch 10.2.0.3.0

Oracle interim Patch Installer version 10.2.0.3.0
Copyright (c) 2005, Oracle Corporation.  All rights reserved..


Oracle Home       : /u02/app/oraglobt/product/10.2.0
Central Inventory : /u02/app/oraglobt/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.3.0
OUI version       : 10.2.0.3.0
OUI location      : /u02/app/oraglobt/product/10.2.0/oui
Log file location : /u02/app/oraglobt/product/10.2.0/cfgtoollogs/opatch/opatch2011-05-08_01-51-50AM.log

List of Homes on this system:

Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
   Oracle Home dir. path does not exist in Central Inventory
   Oracle Home is a symbolic link
   Oracle Home inventory is corrupted
LsInventorySession failed: OracleHomeInventory::load() gets null oracleHomeInfo

OPatch failed with error code 73


------------------------------------Ref. Section-----------------------------------

If oracle home is missing in the Central Inventory , attach it by the following command:

${ORACLE_HOME}/oui/bin/runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="oracle home location" ORACLE_HOME_NAME="a name"


How to find ORACLE_HOME NAME

Check the Inventory File i.e. - inventory.xml

<central inventory location>/ContentsXML/inventory.xml

----------------------------------------------------------------------------

echo $PATH

cd $ORACLE_HOME/oui/bin/

[oraglobt@glob01 bin]$ ./runInstaller -silent -invPtrLoc "/etc/oraInst.loc" -attachHome ORACLE_HOME="/u02/app/oraglobt/product/10.2.0" ORACLE_HOME_NAME="OraDb10g_home1"
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u02/app/oraglobt/oraInventory
'AttachHome' was successful.


[oraglobt@glob01 bin]$ opatch lsinventory

Invoking OPatch 10.2.0.3.0
Oracle interim Patch Installer version 10.2.0.3.0
Copyright (c) 2005, Oracle Corporation.  All rights reserved..


Oracle Home       : /u02/app/oraglobt/product/10.2.0
Central Inventory : /u02/app/oraglobt/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.3.0
OUI version       : 10.2.0.3.0
OUI location      : /u02/app/oraglobt/product/10.2.0/oui
Log file location : /u02/app/oraglobt/product/10.2.0/cfgtoollogs/opatch/opatch2011-05-08_03-14-22AM.log

Lsinventory Output file location : /u02/app/oraglobt/product/10.2.0/cfgtoollogs/opatch/lsinv/lsinventory2011-05-08_03-14-22AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (3):

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Products                                         10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 2                            10.2.0.3.0
There are 3 products installed in this Oracle Home.

Interim patches (4) :
Patch  5892355      : applied on Mon Dec 22 08:07:26 EST 2008
   Created on 17 Apr 2008, 00:19:49 hrs PST8PDT
   Bugs fixed:
     5892355

Patch  5257698      : applied on Mon Dec 22 08:06:52 EST 2008
   Created on 29 Jun 2006, 07:12:38 hrs US/Pacific
   Bugs fixed:
     5257698

Patch  5556081      : applied on Mon Dec 22 07:48:07 EST 2008
   Created on 9 Nov 2006, 22:20:50 hrs PST8PDT
   Bugs fixed:
     5556081

Patch  5557962      : applied on Mon Dec 22 07:48:01 EST 2008
   Created on 9 Nov 2006, 23:23:06 hrs PST8PDT
   Bugs fixed:
     4269423, 5557962, 5528974
--------------------------------------------------------------------------------

OPatch succeeded.
[oraglobt@glob01 bin]$

--------------------------------------Ref. Section-----------------------------------

If oracle home is missing in the Central Inventory , attach it by the following command:

${ORACLE_HOME}/oui/bin/runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="oracle home location" ORACLE_HOME_NAME="a name" CLUSTER_NODES="{}"


To remove incorrect oracle home from the Central Inventory, run the command:

${ORACLE_HOME}/oui/bin/runInstaller -silent -detachHome ORACLE_HOME="oracle home location" ORACLE_HOME_NAME="a name"


How to find ORACLE_HOME NAME

Check the Inventory File i.e. - inventory.xml

inventory.xml file lists all the Oracle homes installed on the node. For each Oracle home, it also lists the Oracle home name, the home index, and the nodes on which the home is installed.

<central inventory location>/ContentsXML/inventory.xml


Find the inventory pointer file in the following location:

For Solaris: /var/opt/oracle/oraInst.loc
For Linux: /etc/oraInst.loc
For Windows this pointer is located in the registry key: \\HKEY_LOCAL_
MACHINE\\Software\Oracle\inst_loc.

A sample of oraInst.loc file is listed:

inventory_loc=/home/oracle_db10g/product/10.2.0/db_1
inst_group=oracle

-------------------------------------------------------------------------------

No comments:

Post a Comment