oraInst.loc檔案錯誤導致opatch失敗問題的解決

cnhtm發表於2010-01-27

在執行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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章