今天准备升级下10.2.0.4.4 发现居然opatch有问题 如下:
[oracle@bogon 9352164]$ $ORACLE_HOME/OPatch/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/10.2/db_1
Central Inventory : /tmp/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.2
OUI version : 10.2.0.4.0
OUI location : /oracle/product/10.2/db_1/oui
Log file location : /oracle/product/10.2/db_1/cfgtoollogs/opatch/opatch2010-06-05_02-25-53AM.log
ApplySession failed: Patch ID is null.
System intact, OPatch will not attempt to restore the system
OPatch failed with error code 73
[oracle@bogon logs]$ $ORACLE_HOME/OPatch/opatch lsinventory
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/10.2/db_1
Central Inventory : /tmp/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.2
OUI version : 10.2.0.4.0
OUI location : /oracle/product/10.2/db_1/oui
Log file location : /oracle/product/10.2/db_1/cfgtoollogs/opatch/opatch2010-06-05_02-35-03AM.log
List of Homes on this system:
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
看来是inventory有点问题了 查了个问题 是关于如果重建inventory的
Steps To Recreate Central Inventory(oraInventory) In RDBMS Homes [ID 556834.1] | |||||
| |||||
修改时间 02-FEB-2009 类型 HOWTO 状态 PUBLISHED |
In this Document
Goal
Solution
References
Applies to:
Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.1.0.6
Information in this document applies to any platform.
Goal
How to recreate oraInventory (Central Inventory) in RDBMS Homes if the central inventory is corrupted or lost?
Solution
STEP 1:
Locating the central inventory
- The location of the central inventory can be found from the central inventory pointer.
Windows - By default the location of the Central inventory will be in "C:\Program Files\Oracle\Inventory"
- The location of the central inventory can be found from the central inventory pointer can be found from the key "inst_loc".
- The key can be found by :
1. Go to "Run" window (Press Windows Key + r)
2. Type "regedit" and enter
3. Expand HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE
4. Find the value of the key "inst_loc"
Note : The following command will also show the inventory pointer in Windows XP,2003 and Vista
C:\>reg query HKLM\SOFTWARE\ORACLE /v inst_loc
Unix/Linux - The location of the central inventory can be found from the central inventory pointer can be found from the file /etc/oraInst.loc (AIX and Linux) or /var/opt/oracle/oraInst.loc (Platform. specific)
- If an orainst.loc file does not exist,then create one as below with the following entries :
inventory_loc=
inst_group=
Eg :
inventory_loc=/u01/oracle/oraInventory
inst_group=oinstall
Note : Make sure that the Oracle Owner have proper permissions(755) on location specified for the oraInventory
STEP 2:
Take an backup of the Central inventory ( If exists)
- Use the following command to take rename the oraInventory (Unix/Linux)
% mv oraInventory oraInventory_orig
STEP 3:
Change the directory to the oui location.
- Use the following command to change the directory to the oui location (Unix/Linux)
% cd $ORACLE_HOME/oui/bin
STEP 4:
Attaching the Home
- Execute runInstaller with -attachHome option for Oracle Home
ORACLE_HOME=/u01/app/oracle/product/10.2.0.3
ORACLE_HOME_NAME=OraDb10g_home1
% ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/u01/app/oracle/product/10.2.0.3" ORACLE_HOME_NAME="OraDb10g_home1"
- If you have more than one oracle homes you have to execute the STEP 4 with respective "ORACLE_HOME" and "ORACLE_HOME_NAME" for all the Oracle Homes.
Note :
Recreation of Central Inventory in RDBMS Homes is only supported from 10.2.0.1.0 and later.
No down time is required for recreating the global inventory (oraInventory)
References
NOTE:414600.1 - Opatch Lsinventory "Can not get details for given Oracle Home" error
NOTE:472854.1 - How to Recreate the OraInventory on UNIX Systems
Oracle® Universal Installer and OPatch User's Guide
最后我重建了下 发现居然OK了。。
[oracle@bogon Disk1]$ cd $ORACLE_HOME/oui/bin
[oracle@bogon bin]$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/oracle/product/10.2/db_1" ORACLE_HOME_NAME="OraDb10g_home1"
Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
>>> Ignoring required pre-requisite failures. Continuing...
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/product/10.2/db_1/inventory
'AttachHome' was successful.
[oracle@bogon bin]$ $ORACLE_HOME/OPatch/opatch lsinventory
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/10.2/db_1
Central Inventory : /oracle/product/10.2/db_1/inventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.2
OUI version : 10.2.0.4.0
OUI location : /oracle/product/10.2/db_1/oui
Log file location : /oracle/product/10.2/db_1/cfgtoollogs/opatch/opatch2010-06-05_02-50-57AM.log
Lsinventory Output file location : /oracle/product/10.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory2010-06-05_02-50-57AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (2):
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
There are 2 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/230160/viewspace-664542/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/230160/viewspace-664542/