ITPub博客

首页 > 数据库 > Oracle > opatch报错:The oraInst.loc file specified is not valid

opatch报错:The oraInst.loc file specified is not valid

原创 Oracle 作者:shytodear 时间:2016-01-25 17:00:00 0 删除 编辑
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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-11-05

  • 博文量
    65
  • 访问量
    164120