环境:
AIX系统,10204版本,服务器上有2套数据库,其中oracle用户安装的数据库下面有4个实例,kserver用户安装的数据库下有一个实例
问题:
kserver用户下的数据库不能进行补丁安装
报错:
List of Homes on this
system:
Home name= OUIHome1, Location=
"/orahome/product/10.2"
OPatchSession cannot load inventory for the given Oracle
Home
/oracle/app/10g. Possible causes are:
No read or write
permission to ORACLE_HOME/.patch_storage
Central Inventory is
locked by another OUI instance
No read permission to
Central Inventory
The lock file exists in
ORACLE_HOME/.patch_storage
The Oracle Home does not
exist in Central Inventory
ApplySession failed: ApplySession failed to prepare the
system.
OracleHomeInventory gets null oracleHomeInfo
System intact, OPatch will not attempt to restore the
system
OPatch failed with error code 73
在执行opatch lsinventory -detail的时候出现如下错误:
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 gets null
oracleHomeInfo
OPatch failed with error code 73
后查找metalink,找出问题根源为:kserver用户打补丁的时候不能识别自身的软件目录,只能认到oracle用户的软件目录。
[ID 754667.1]
Symptoms
Applying any patch on a Grid Control Agent home fails with the
following error, with patch 6780904, for instance:
oracle@kogc1 12:10:40> opatch apply
Invoking OPatch 10.2.0.4.2
Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation. All rights
reserved.
Oracle Home : /oracle/product/10201/agent10g
Central Inventory : /oracle/product/10204/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.4.2
OUI version : 10.2.0.4.0
OUI location : /oracle/product/10201/agent10g/oui
Log file location :
/oracle/product/10201/agent10g/cfgtoollogs/opatch/opatch2008-12-05_12-10-44PM.log
ApplySession applying interim patch '6780904' to OH
'/oracle/product/10201/agent10g'
List of Homes on this system:
OPatchSession cannot load inventory for the given Oracle Home
/oracle/product/10201/agent10g.
Possible causes are:
No read or write permission to
ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory
ApplySession failed: ApplySession failed to prepare the
system. OracleHomeInventory gets null
oracleHomeInfo
System intact, OPatch will not attempt to restore the
system
OPatch failed with error code 73
Cause
The oraInst.loc file in the default location is pointing to
the wrong oraInventory filepath.
Solution
Solution:
1. Export the appropriate ORACLE_HOME to the
environment.
2. Correct the oraInventory path in oraInst.loc file.
3. Apply patch as per the readme.txt
NOTE:
The location of the oraInventory is determined by the contents
of the /etc/oraInst.loc (AIX and Linux Platform) or
/var/opt/oracle/OraInst.loc (Solaris and HP-UX platform).
Where more than one oraInventory is being used, and it is not
desired to edit the oraInst.loc in the default location, then these
considerations may apply:
1. Create another oraInst.loc file on the file system
2. Include the location of the oraIventory in the new
oraInst.loc file
3. Use the following command to use the oraInst.loc file from
the non default location -
opatch apply -invPtrLoc
opatch apply -invPtrLoc /oracle/app/10g/oraInst.loc
解决方法:
1、修改/etc/oraInst.loc文件,把inventory_loc及inst_group参数都换成kserver用户的路径及属主。
2、执行attachHome.sh脚本
% cd
$ORACLE_HOME/oui/bin
% ./attachHome.sh
Starting Oracle Universal
Installer...
Checking swap space: must be greater than 500 MB.
Actual 1983 MB Passed
Preparing to launch Oracle Universal Installer from
/tmp/OraInstall2012-11-06_12-58-02PM. Please wait
...[webadmin@umemadminda02 bin]# [WARN ][jrockit] MaxPermSize=256m
ignored: Not a valid option for JRockit
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /home/webadmin/oraInventory
'AttachHome' was successful.
3、再进行打补丁$ORACLE_HOME/OPatch/opatch
apply
4、补丁安装成功后,把/etc/oraInst.loc文件改回oracle的参数即可。