How to correct & fix the corrupted Oracle (9i, 10g, 11g) inventory using runInstaller & opatch?

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
Inventory is the index for the oracle installation. All the details about the ORACLE_HOME including different utility versions, patch details etc. If you do a fresh Oracle installation the inventory will be updated. But if you copy the ORACLE binaries from some other location and if you are not updating the inventory, we cannot read the inventory using opatch utility.
It will give error. Here I am showing the steps to fix the oracle inventory. Please see.

Step 1: checking the inventory of a corrupted database using opatch lsinventory utility and the result is an error.

$ /oracle/milprod/oracle/product/11.1.0/OPatch/opatch lsinventory -invPtrLoc  ./oraInst.loc
Invoking OPatch 11.1.0.6.9

Oracle Interim Patch Installer version 11.1.0.6.9
Copyright (c) 2009, Oracle Corporation.  All rights reserved.

Oracle Home       : /oracle/milprod/oracle/product/11.1.0
Central Inventory : /oracle/milprod/oracle/product/11.1.0/inventory
   from           : ./oraInst.loc
OPatch version    : 11.1.0.6.9
OUI version       : 11.1.0.7.0
OUI location      : /oracle/milprod/oracle/product/11.1.0/oui
Log file location : /oracle/milprod/oracle/product/11.1.0/cfgtoollogs/opatch/opatch2011-06-15_01-40-34AM.log

Patch history file: /oracle/milprod/oracle/product/11.1.0/cfgtoollogs/opatch/opatch_history.txt

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
oracle@prodserv(230) milprod /oracle/milprod/oracle/product/11.1.0

Step 2
For safer side take a backup or move the current inventory to a new location.

mv -i inventory inventory.old

Step 3

Create a oraInst.loc (if not present already) file with following content in ORACLE_HOME directory
inventory_loc=/oracle/milprod/oracle/product/11.1.0/inventory
inst_group=dba

Step 4

Run the following command to fix the inventory in Unix prompt from ORACLE_HOME direcotry

$ORACLE_HOME/oui/bin/runInstaller -silent -invPtrLoc "/oracle/milprod/oracle/product/11.1.0/oraInst.loc" -attachHome ORACLE_HOME="/oracle/milprod/oracle/product/11.1.0" ORACLE_HOME_NAME="OraDb11g_home"

$ ORACLE_HOME/oui/bin/runInstaller -silent -invPtrLoc "/oracle/milprod/oracle/product/11.1.0/oraInst.loc" -attachHome ORACLE_HOME="/oracle/milprod/oracle/product/11.1.0" ORACLE_HOME_NAME="OraDb11g_home"
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 21312 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-06-15_01-46-42AM. Please wait ...oracle@prodserv(241) milprod /oracle/milprod/oracle/product/11.1.0/oui/bin
$ The inventory pointer is located at /oracle/milprod/oracle/product/11.1.0/oraInst.loc
The inventory is located at /oracle/milprod/oracle/product/11.1.0/inventory
'AttachHome' was successful.

Step 5

Now your corrupted Oracle inventory is fixed. Once again you check your inventory with opatch command.
$ /oracle/milprod/oracle/product/11.1.0/OPatch/opatch lsinventory -invPtrLoc  /oracle/milprod/oracle/product/11.1.0/or>
Invoking OPatch 11.1.0.6.9

Oracle Interim Patch Installer version 11.1.0.6.9
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/milprod/oracle/product/11.1.0
Central Inventory : /oracle/milprod/oracle/product/11.1.0/inventory
   from           : /oracle/milprod/oracle/product/11.1.0/oraInst.loc
OPatch version    : 11.1.0.6.9
OUI version       : 11.1.0.7.0
OUI location      : /oracle/milprod/oracle/product/11.1.0/oui
Log file location : /oracle/milprod/oracle/product/11.1.0/cfgtoollogs/opatch/opatch2011-06-15_01-49-21AM.log

Patch history file: /oracle/milprod/oracle/product/11.1.0/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /oracle/milprod/oracle/product/11.1.0/cfgtoollogs/opatch/lsinv/lsinventory2011-06-15_01-49-21AM.txt

--------------------------------------------------------------------------------
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.


Interim patches (3) :

Patch  9352179      : applied on Tue Aug 24 14:11:35 PDT 2010
Unique Patch ID:  12335561
   Created on 1 Apr 2010, 01:22:01 hrs PST8PDT
   Bugs fixed:
     7378322, 9068088, 8348481, 9054253, 6851110, 7206858, 7497788, 8974548
     7331867, 8251486, 8851675, 8211920, 9352179, 7013124, 7643188, 7135702
     7529174, 7196532, 7515779, 7705669, 8402548, 8608377, 7119382, 7510766
     9001453, 8364676, 9066130, 7424804, 7628387, 7408621, 7426336, 7553884
     8856696, 6843972, 7694979, 8565708, 6972189, 6598432, 6768362, 6501490
     8836375, 8216875, 7527650, 7719143, 8402551, 7454752, 8290478, 7412296
     8402555, 7719148, 8284633, 8318050, 7639602, 8539335, 8613137, 7650993
     8940197, 6970731, 7589862, 9170608, 7131291, 9109536, 7586451, 7446163
     8199266, 7460818, 9114072, 6618461, 7451927, 7373196, 8230457, 7336031
     7420394, 8413059, 8402562, 8914979, 8402637, 7393804, 8876094, 6196748
     7627743, 7348847, 8408887, 7183523, 8531282, 7441663, 7720494, 7719668
     8645846, 8539923, 9458811, 8534338, 8339404, 8236851, 9458814, 7602341
     9458816, 7036453, 7610362, 8855553, 7384419, 7690421, 9458819, 8419383
     8855559, 8543737, 7447559, 6772911, 7175513, 7341598, 7706138, 8243648
     8367827, 8365141, 7350127, 9027691, 8549480, 8462173, 7356443, 7593835
     8483871, 8242410, 7044551, 7572069, 7639121, 9458829, 8855565, 8825048
     7253531, 8328853, 8341623, 8409848, 6851669, 7318276, 8257122, 7013817
     8860821, 7309458, 8450529, 8306933, 8306934, 6840740, 9458831, 6981690
     8304329, 8281906, 7480809, 8855570, 8339352, 7340448, 8499600, 7393258
     8588540, 8790767, 8855575, 6599920, 7630416, 7426959, 8855577, 6980601
     8342506, 8717461, 6452375, 8607693, 6407486, 7653579, 7416901, 7281382
     8599477, 7535429, 8582594, 7475055, 8217795, 7409110, 7432514, 8362693
     7436152, 7680907, 7013835, 7708340, 8499043, 8361398, 6784747, 7524944
     7496908, 7662620, 8224083, 7385253, 9189647, 7225720, 6941717, 7122161
     8898852, 8363210, 7477246, 7377810, 7299153, 9118620, 8213302, 8909984
     9118622, 9209238, 8702276, 7497640, 6991626, 7630874, 7311909, 7432601
     7213937, 7462112, 7352414, 7516867, 8199107, 7296258, 6812439, 6870937
     7219752, 7263842, 8287680, 6900214, 8870559, 6882739, 8813366, 8990527
     8352304, 7500792, 8352309, 7538000, 8834636, 8324760, 7652888, 7330434
     7113299, 7307972, 8487273, 7462709, 7486595, 8650661, 9032717, 8658581
     8244217, 7515145, 7499911, 7411865, 7276960, 8890026, 7432556, 7613481
     7522002, 8674263, 7452373, 8221425, 9188010, 7438445, 7334226, 9197917
     8284438, 7494333, 7318049, 8250643, 7834195, 8214576, 6679303, 8815639
     8277580, 7715244, 7675269, 7516536, 8490879, 6980597, 8301559, 7499353
     8496830, 7357609, 7462589, 6647480, 8416414, 7830065, 7189645, 7203349
     8702535, 7436280, 6955744, 7506785, 7366290, 6977167, 8570572, 7702085
     8348464, 7185872, 8625762, 6059178, 7257038, 8542307, 8833297, 8578132
     7606362, 7330611, 8226397, 7628866, 6903819, 8391256, 7676737, 7258928
     7829321, 7311601, 8433270, 7511040, 7434194, 8369094, 8563941, 8563942
     8563943, 8563944, 8563945, 8563946, 7716219, 8563947, 7345904, 8563948
     7556778, 8220734, 6870994, 7597354, 9135679, 7523787

Patch  7019661      : applied on Tue Aug 24 13:39:21 PDT 2010
Unique Patch ID:  11132692.1
   Created on 6 Apr 2009, 07:43:52 hrs US/Pacific
   Bugs fixed:
     7019661

Patch  7394790      : applied on Wed Feb 24 11:48:28 PST 2010
Unique Patch ID:  11678836
   Created on 18 Aug 2009, 15:46:40 hrs PST8PDT
   Bugs fixed:
     7394790



--------------------------------------------------------------------------------

OPatch succeeded.
oracle@prodserv(242) milprod /oracle/milprod/oracle/product/11.1.0/oui/bin
$

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer