While deploying the bug patch to one of the staging server, I found the below error like
-bash-3.2$ cd /u01/app/oracle/product/11.2.0/db_1/OPatch
-bash-3.2$ ./opatch lsinventory
Invoking OPatch 11.2.0.1.7
Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-03-27_14-05-09PM.log
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
-bash-3.2$ cd /u01/app/oracle/product/11.2.0/db_1/OPatch
-bash-3.2$ ./opatch lsinventory
Invoking OPatch 11.2.0.1.7
Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-03-27_14-05-09PM.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
Soon I come to know that my Oracle Inventory is got corrupted since its unable to read the "inventory.xml" file so it needs to be recreate in order to apply the patch.
Below are the steps to recreate the Oracle Inventory.
cd $ORACLE_HOME/oui/bin/
./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="Oracle_Home_Location" ORACLE_HOME_NAME="Name_Of _Oracle_Home"
-bash-3.2$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/u01/app/oracle/product/11.2.0/db_1" ORACLE_HOME_NAME="OraDb11g_home1"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 995 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'AttachHome' was successful.
-bash-3.2$ cd /u01/app/oraInventory/
-bash-3.2$ ls
ContentsXML logs
-bash-3.2$ cd ContentsXML/
-bash-3.2$ ls
comps.xml inventory.xml libs.xml
-bash-3.2$ more inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2011, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>11.2.0.3.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb11g_home1" LOC="/u01/app/oracle/product/11.2.0/db_1" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
-bash-3.2$ ./opatch apply
Invoking OPatch 11.2.0.1.7
Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-03-27_13-57-18PM.log
Applying interim patch '18483015' to OH '/u01/app/oracle/product/11.2.0/db_1'
Verifying environment and performing prerequisite checks...
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Patching component oracle.rdbms, 11.2.0.3.0...
Patch 18483015 successfully applied
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-03-27_03-32-52AM.log
OPatch succeeded.
Reference:
OTN Doc: Doc ID 556834.1
OTN Doc: Doc ID 556834.1
No comments:
Post a Comment