opatch inventory 查询时报错"LsInventory: OPatch Exception while accessing O2O"

在一次10.2.0.4升级到11.2.0.3.5升级项目中,遇到一个小问题(在查询opatch lsinventory 由于存在two oraInst.loc files 导致)

[oracle@tqd1a] /oracle/app/product/10.2.0/database/OPatch> ./opatch lsinventory


Oracle Interim Patch Installer version 1.0.0.0.57
Copyright (c) 2007 Oracle Corporation. All Rights Reserved..


We recommend you refer to the OPatch documentation under
OPatch/docs for usage reference. We also recommend using
the latest OPatch version. For the latest OPatch version
and other support related issues, please refer to document
293369.1 which is viewable from metalink.oracle.com


Oracle Home           : /oracle/app/product/10.2.0/database
Oracle Home Inventory : /oracle/app/product/10.2.0/database/inventory
Central Inventory     : /oracle/app/oraInventory
   from               : /etc/oraInst.loc
OUI location          : /oracle/app/product/10.2.0/database/oui
OUI shared library    : /oracle/app/product/10.2.0/database/oui/lib/aix/liboraInstaller.so
Java location         : /oracle/app/product/10.2.0/database/jre/1.4.2/bin/java
Log file location     : /oracle/app/product/10.2.0/database/.patch_storage//*.log


Creating log file "/oracle/app/product/10.2.0/database/.patch_storage/LsInventory__12-14-2014_20-05-42.log"


Result: 


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
  


There is no Interim Patch






OPATCH_JAVA_ERROR  : An exception of type "OPatchException" has occurred: 
Can not get a list of inventory on this home.


Metalink如是说:

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 10.2.0.3
This problem can occur on any platform.

Symptoms

Running the command "opatch lsinventory" gives following error :- 

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 
There is no Interim Patch 
OPATCH_JAVA_ERROR : An exception of type "OPatchException" has occurred: 
Can not get a list of inventory on this home.

Cause

Trying to use a different name for oraInst.loc file. 

opatch can understand only the name oraInst.loc for inventory pointer location file.

So it will not recognize other names for example oraInst.loc_oracle9i 

In the above scenario there were two oraInst.loc files 

1.oraInst.loc 
2.oraInst.loc_oracle9i 

Tried running opatch lsinventory using inventory pointer file oraInst.loc_oracle9i, but it caused the error since opatch can understand oraInst.loc only.

Solution


(1)As two files with same name can not reside in a single directory, keep different oraInst.loc files in different directories and maintain a record of it. 

(2)Change inventory pointer location files name to oraInst.loc 

% mv oraInst.loc_oracle9i oraInst.loc 

(3) Set the ORACLE_HOME 

(4)Now run opatch lsinventory -invPtrLoc with correct file name. 
%opatch lsinventory -invPtrLoc


最终解决方案:

改文件inventory.xml中的$ORACLE_HOME路径
说明:在tar包安装Oracle的过程中由于可能目标机器和源机器的目录发上改变导致出现以上问题,所以多留意一下就没什么问题了

[oracle@tqd1b] /oracle/app/oraInventory/ContentsXML> vi inventory.xml
"inventory.xml" 17 lines, 505 characters 
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 2002 Oracle Corporation. All rights Reserved --&gt
<!-- Do not modify the contents of this file by hand. --&gt


   10.1.0.3.0
   2.1.0.6.0


/oracle/app/product/10.2.0/database" TYPE="O" IDX="1">
   
     
     
   



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29446986/viewspace-1367682/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29446986/viewspace-1367682/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值