opatch報錯:The oraInst.loc file specified is not valid

shytodear發表於2016-01-25
1. opatch命令檢視補丁時報錯:
[oracle@test oraInventory]$ opatch lsinventory
Invoking OPatch 10.2.0.1.0

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

Oracle Home       : /app/oracle/product/10.2.0/db_1
Central Inventory : /oracle/oraInventory
   from           : /app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version    : 10.2.0.1.0
OUI version       : 10.2.0.1.0
OUI location      : /app/oracle/product/10.2.0/db_1/oui
Log file location : /app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch-2016_Jan_25_16-20-04-CST_Mon.log


LsInventory Session failed: OPatch failed to locate Central Inventory.
Possible causes are: 
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.
    
2. 可能資料庫ORACLE_HOME是遷移過來的,改為正確的目錄&組
$ vi /app/oracle/product/10.2.0/db_1/oraInst.loc
inventory_loc=/app/oracle/oraInventory
inst_group=dba


3. 修改正確後opatch命令執行還是報錯:
[oracle@test ContentsXML]$ opatch lsinventory
Invoking OPatch 10.2.0.1.0

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

Oracle Home       : /app/oracle/product/10.2.0/db_1
Central Inventory : /app/oracle/oraInventory
   from           : /app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version    : 10.2.0.1.0
OUI version       : 10.2.0.1.0
OUI location      : /app/oracle/product/10.2.0/db_1/oui
Log file location : /app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch-2016_Jan_25_16-42-19-CST_Mon.log


OPatch failed to lock Central Inventory using /app/oracle/product/10.2.0/db_1/oraInst.loc, now will try again using /etc/oraInst.loc
List of Homes on this system:


  Home name= OraClient11g_home1, Location= "/data/oracle/product/11.2.0/client_1"
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
LsInventory Session failed: OracleHomeInventory::load() gets null oracleHomeInfo
--------------------------------------------------------------------------------
The following warnings has happened during OPatch execution:
1) OUI-67105:OPatch failed to lock Central Inventory using /app/oracle/product/10.2.0/db_1/oraInst.loc, now will try again using /etc/oraInst.loc
--------------------------------------------------------------------------------

OPatch failed with error code 72

4. ORACLE_HOME不正確,修改XML配置
$ vi /app/oracle/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.4.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraClient11g_home1" LOC="/data/oracle/product/11.2.0/client_1" TYPE="O" IDX="1"/>
<HOME NAME="OraClient11g_home2" LOC="/app/oracle/product/10.2.0/db_1" TYPE="O" IDX="2"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

5.修改這兩個檔案後,opatch正常:
 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27126919/viewspace-1982073/,如需轉載,請註明出處,否則將追究法律責任。

相關文章