Trying to upgrade an Oracle Home and discovered the Oracle Home was corrupted and had to rebuild it.
The steps are very simple.
I just followed the note: Steps To Recreate Central Inventory(oraInventory) In RDBMS Homes
(Doc ID 556834.1)
1. I ran the OPatch command and it failed, highlighted in Green below.
[oracle@server1] $ $ORACLE_HOME/OPatch/opatch lsinventory -all
Invoking OPatch 11.1.0.6.2
Oracle Interim Patch Installer version 11.1.0.6.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /u01/oracle/product/11.1.0
Central Inventory : /u01/oracle/product/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.2
OUI version : 11.1.0.7.0
OUI location : /u01/oracle/product/11.1.0//oui
Log file location : /u01/oracle/product/11.1.0/cfgtoollogs/opatch/opatch2014-08-02_01-31-56AM.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
2. Rename the existing corrupted oraInventory directory listed in the /etc/oraInst.loc file.
[oracle@server1] $ ls -ld /u01/oracle/product/oraInventory
drwxr-sr-x 3 oracle dba 256 Jul 30 18:20 /u01/oracle/product/oraInventory
[oracle@server1] $ cd /u01/oracle/product/
[oracle@server1] $ mv oraInventory oraInventory_old_Aug_2_2014
3. Go to the $ORACLE_HOME/oui/bin directory
[oracle@server1] $ cd $ORACLE_HOME/oui/bin
[oracle@server1] $ pwd
/u01/oracle/product/11.1.0/oui/bin
[oracle@server1] $ echo $ORACLE_HOME
/u01/oracle/product/11.1.0/
4. Attach the Oracle Home and recreate the inventory with the runInstaller command.
[oracle@server1] $ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/u01/oracle/product/11.1.0" ORACLE_HOME_NAME="11gR1"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 16704 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-08-02_01-36-41AM. Please wait ...[oracle@server1] $ The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/oracle/product/oraInventory
[oracle@server1] $ 'AttachHome' was successful.
5. Now the Oracle Home inventory is fine, whala! The opatch command will run fine now.
[oracle@server1] $ $ORACLE_HOME/OPatch/opatch lsinventory -all
Invoking OPatch 11.1.0.6.2
Oracle Interim Patch Installer version 11.1.0.6.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /u01/oracle/product/11.1.0
Central Inventory : /u01/oracle/product/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.2
OUI version : 11.1.0.7.0
OUI location : /u01/oracle/product/11.1.0//oui
Log file location : /u01/oracle/product/11.1.0/cfgtoollogs/opatch/opatch2014-08-02_01-38-46AM.log
Lsinventory Output file location : /u01/oracle/product/11.1.0/cfgtoollogs/opatch/lsinv/lsinventory2014-08-02_01-38-46AM.txt
--------------------------------------------------------------------------------
List of Oracle Homes:
Name Location
11gR1 /u01/oracle/product/11.1.0
Installed Top-level Products (2):
Oracle Database 11g 11.1.0.6.0
Oracle Database 11g Patch Set 1 11.1.0.7.0
There are 2 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.
No comments:
Post a Comment