oraInst.loc文件错误导致opatch失败问题的解决

在执行opatch命令的时候报load() gets null oracleHomeInfo错误,详细错误信息如下:

[oracle@testdb] /tmp> 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 : /oracle/app/10g
Central Inventory : /oracle/PRD/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /oracle/app/10g/oui
Log file location : /oracle/app/10g/cfgtoollogs/opatch/opatch2010-01-27_14-38-31PM.log

List of Homes on this system:

Home name= PRD_102_64, Location= "/oracle/PRD/102_64"
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 succeeded.
[@more@]

检查如上信息提示,发现Central Inventory:指示的Inventory目录为/oracle/PRD/OraInventory,这不是数据库正确的inventory目录。
从上面from那一行知道,这个目录是从/etc/oraInst.loc文件中读取到的,这个文件的内容如下:

inventory_loc=/oracle/PRD/oraInventory
inst_group=oinstall

用root用户修改/etc/oraInst.loc,使inventory_loc的值为正确的目录,再次运行opath命令,错误解决

[oracle@testdb] /tmp> 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 : /oracle/app/10g
Central Inventory : /oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /oracle/app/10g/oui
Log file location : /oracle/app/10g/cfgtoollogs/opatch/opatch2010-01-27_14-47-45PM.log

Lsinventory Output file location : /oracle/app/10g/cfgtoollogs/opatch/lsinv/lsinventory2010-01-27_14-47-45PM.txt

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

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


Interim patches (16) :

......

Patch 5557962 : applied on Wed Mar 19 01:38:08 GMT+08:00 2008
Created on 9 Nov 2006, 23:23:06 hrs PST8PDT
Bugs fixed:
4269423, 5557962, 5528974


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

OPatch succeeded.

--end--

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

转载于:http://blog.itpub.net/22049049/viewspace-1030944/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值