問題現象:
[root@hq-d-cordys02 dbhome_1]# su - oracle
[oracle@hq-d-cordys02 ~]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/grid/oraInventory
from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.1.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2013-07-28_20-29-14PM_1.log
List of Homes on this system:
Home name= Ora11g_gridinfrahome1, Location= "/u01/11.2.0/grid"
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
解決過程:
使用attachHome.sh腳本進行重新oracle_home的關聯
oracle@hq-d-cordys02 ~]$ pwd /home/oracle [oracle@hq-d-cordys02 ~]$ cd $ORACLE_HOME [oracle@hq-d-cordys02 dbhome_1]$ cd oui/bin [oracle@hq-d-cordys02 bin]$ ls -lrt total 236 -rwxr-x--- 1 oracle oinstall 227 Jul 28 18:46 addLangs.sh -rwxr-xr-x 1 oracle oinstall 658 Jul 28 18:46 filesList.bat -rwxr-x--- 1 oracle oinstall 152477 Jul 28 18:46 runInstaller -rwxr-x--- 1 oracle oinstall 22033 Jul 28 18:46 runSSHSetup.sh -rwxr-x--- 1 oracle oinstall 19892 Jul 28 18:46 lsnodes -rwxr-xr-x 1 oracle oinstall 837 Jul 28 18:46 filesList.sh -rwxr-x--- 1 oracle oinstall 204 Jul 28 18:46 detachHome.sh -rwxr-x--- 1 oracle oinstall 1109 Jul 28 18:46 runConfig.sh -rwxr-x--- 1 oracle oinstall 297 Jul 28 18:46 attachHome.sh -rwxr-x--- 1 oracle oinstall 153 Jul 28 18:46 addNode.sh -rwxr-x--- 1 oracle oinstall 79 Jul 28 18:46 runInstaller.sh -rwxr-xr-x 1 oracle oinstall 201 Jul 28 18:46 filesList.properties drwxr-xr-x 2 oracle oinstall 4096 Jul 28 18:46 resource [oracle@hq-d-cordys02 bin]$ ./attachHome.sh -local "CLUSTER_NODES=hq-d-cordys01,hq-d-cordys02" LOCAL_NODE=hq-d-cordys02 Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 8191 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-07-28_08-35-05PM. Please wait ... [oracle@hq-d-cordys02 bin]$ The inventory pointer is located at /etc/oraInst.loc The inventory is located at /u01/grid/oraInventory 'AttachHome' was successful.
打補丁
[root@hq-d-cordys02 OPatch]# ./opatch auto /software/pathes/psu -oh /u01/app/oracle/product/11.2.0/dbhome_1 -ocmrf /software/ocm.rsp
Executing /usr/bin/perl ./crs/patch112.pl -patchdir /software/pathes -patchn psu -oh /u01/app/oracle/product/11.2.0/dbhome_1 -ocmrf /software/ocm.rsp -paramfile /u01/11.2.0/grid/crs/install/crsconfig_params
opatch auto log file location is /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/crs/../../cfgtoollogs/opatchauto2013-07-28_20-37-05.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params
patch /software/pathes/psu/16670704/custom/server/16670704 apply successful for home /u01/app/oracle/product/11.2.0/dbhome_1