TIP 60#: Force Opatch to use non-default inventory

If Different inventory is kept for each Oracle installation, you will need to point opatch to different inventory at time of patching.
If inventory does not match with with Oracle home, the following errors may raise during opatch run :

LsInventorySession failed: OracleHomeInventory::load() gets null oracleHomeInfo

LsInventory: OPatch Exception while accessing O2O

OPATCH_JAVA_ERROR : An exception of type "OPatchException" has occurred:
OPatch Exception:
OUI found no such ORACLE_HOME set in the environment
Can not get details for given Oracle Home
An exception occurs
null


First of all check opatch output and look at "Location of Oracle Inventory Pointer" entry.
By default it is /etc/oraInst.loc. If this entry does not point to right location, you will have 2 options to fix the situation:

- copy valid oraInst.loc as /etc/oraInst.loc as root.
It is not feasible always since rarely DBA has root access on box.

- Run the following command to point opatch to correct inventory (Replace /etc/oraInst.loc.9i_version with your own inventory location).

opatch lsinventory -invPtrLoc /etc/oraInst.loc.9i_version

Here is a sample :


oracle@test(/home/oracle): opatch lsinventory
Invoking OPatch 10.2.0.2.3

Oracle interim Patch Installer version 10.2.0.2.3
Copyright (c) 2007, Oracle Corporation. All rights reserved..


Oracle Home : /s005/home/oracle/product/10.2.0.2
Central Inventory : /s006/home/oracle/infraAS10g/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.2.3
OUI version : 10.2.0.2.0
OUI location : /s005/home/oracle/product/10.2.0.2/oui
Log file location : /s005/home/oracle/product/10.2.0.2/cfgtoollogs/opatch/opatch2007-10-18_16-16-19PM.log

List of Homes on this system:

Home name= OUIHome1, Location= "/s006/home/oracle/infraAS10g/product/10.1.0.4"
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

=============
oracle@test(/home/oracle):opatch lsinventory -invPtrLoc /etc/oraInst.loc.9i_version
Invoking OPatch 10.2.0.2.3

Oracle interim Patch Installer version 10.2.0.2.3
Copyright (c) 2007, Oracle Corporation. All rights reserved..
Oracle Home : /s005/home/oracle/product/10.2.0.2
Central Inventory : /s005/home/oracle/oraInventory
from : /etc/oraInst.loc.9i_version
OPatch version : 10.2.0.2.3
OUI version : 10.2.0.2.0
OUI location : /s005/home/oracle/product/10.2.0.2/oui
Log file location : /s005/home/oracle/product/10.2.0.2/cfgtoollogs/opatch/opatch2007-10-18_16-17-29PM.log

Lsinventory Output file location : /s005/home/oracle/product/10.2.0.2/cfgtoollogs/opatch/lsinv/lsinventory2007-10-18_16-17-29PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (4):

Oracle Client 10.2.0.1.0
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Products 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 1 10.2.0.2.0
There are 4 products installed in this Oracle Home.

Interim patches (2) :

Patch 5075470 : applied on Sun Feb 18 10:58:23 EST 2007
Created on 6 Apr 2006, 03:38:28 hrs US/Pacific
Bugs fixed:
5075470

Patch 4689959 : applied on Sun Feb 18 10:33:33 EST 2007
Created on 22 Sep 2006, 04:57:06 hrs US/Pacific
Bugs fixed:
4689959



2 comments:

Nirav said...

This is so useful!
I had the exact issue that is described here, I did a google search and came to this site. The suggestion worked perfectly!! Thank you so much!
Nirav

Anonymous said...

Great work