Strategies for a Corrupted Oracle Central Inventory [ID 414600.1]

rongshiyuan發表於2012-12-25
Strategies for a Corrupted Oracle Central Inventory [ID 414600.1]

In this Document


Applies to:

Oracle Server - Enterprise Edition - Version 9.2.0.1 to 11.2.0.3 [Release 9.2 to 11.2]
Information in this document applies to any platform.
Oracle Server Enterprise Edition - Version: 9.2.0.1 to 11.1.0.99
This error can occur while attempting to apply any patch or patchset with the opatch utility.


Symptoms

The command "opatch lsinventory" or "opatch lsinventory -detail" errors out as follows:

example 1
===========
$ opatch lsinventory
Oracle Interim Patch Installer version 1.0.0.0.55
Can not get details for given Oracle Home
LsInventory: OPatch Exception while accessing O2O
OPATCH_JAVA_ERROR : An exception of type "OPatchException" has occurred:
OPatch Exception:
Can not get details for given Oracle Home

example 2
===========
Oracle interim Patch Installer version 10.2.0.3.0
OPatch failed to locate Central Inventory.
Possible causes are:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.
LsInventorySession failed: OracleHomeInventory::createInventoryObj() gets a null OiicStandardInventorySession object
OPatch failed with error code 73

Cause

You may have a corrupted Oracle Central Inventory. Please re-try using the newest opatch version, to ensure that you still have the error. For assistance, See Note 224346.1, "Where is Latest Version of Opatch?"

If the same error persists, then you have a corrupted Oracle Central Inventory.

  • If so, it is very likely that the RDBMS software was placed by some method other than an OUI installation, such as a "copy". This is the number 1 cause of a corrupted Oracle Central Inventory.
  • The "next most likely" cause is changing, editing, moving, switching, copying or otherwise adjusting the "oraInventory" directory, or the /etc/oraInst.loc (/var/opt/oracle/oraInst.loc on some platforms) file that points to the "oraInventory" directory. This is the number 2 cause of a corrupted Oracle Central Inventory.


Solution

Because all Oracle RDBMS software present on this system shares the same, one, common Oracle Central Inventory (OCI), the "known proven solution" is to re-install ALL Oracle RDBMS software. However, some alternative procedures may prove effective in some situations:

KNOWN, PROVEN SOLUTION
=========================
1. Obtain a cold backup of all database instances that you want to retain.
2. Implement Note 279519.1, "How to completely remove 8i / 9i Database and Software".
3. If 10g RDBMS software is also present, then Implement Note 275493.1, "Removing 10g Database and Software from AIX, HP-UX, Linux,".
4. Re-install the Oracle 9iR2 RDBMS software via the “runInstaller” (aka OUI) process.
5. If 10g RDBMS instances are also involved, then re-install the Oracle 10g RDBMS software via the “runInstaller” (aka OUI) process.
6. recover the database instances
7. re-try the failing patch or patchset.

POTENTIAL ALTERNATIVE #1
==========================
1. Use the Appendix named "Troubleshooting and Debugging Oracle Universal Installer"
from the Oracle® Universal Installer and OPatch User's Guide:

a.) 10g Release 2 (10.2) for Windows and UNIX
Part Number B16227-12

b.) 11g Release 1 (11.1) for Windows and UNIX
Part Number B31207-10

c.) 11g Release 2 (11.2) for Windows and UNIX
Part Number E12255-10

POTENTIAL ALTERNATIVE #2
==========================
1. Obtain a cold backup of all database instances that you want to retain.
2. Implement NOTE 433424.1, "OPATCH FAILED TO LOCATE CENTRAL INVENTORY - ERROR CODE 73". It is possible that the "oraInst.loc" file simply has the two lines in the wrong order.

POTENTIAL ALTERNATIVE #3
=========================
1. Obtain a cold backup of all database instances that you want to retain.
2. Check to see if Note 401454.1, “Opatch Lsinventory Raises An OPatchException While Accessing O2O” describes your situation. It may be that your $ORACLE_HOME environment variable IS an existing directory, but is NOT an actual Oracle Home as registered in the oraInventory.

POTENTIAL ALTERNATIVE #4
==========================
1. Obtain a cold backup of all database instances that you want to retain.
2. Depending upon the exact OCI details of your situation, consider simply installing (with the runInstaller tool) another fresh, parallel oracle home. Then adjust your DBs over to the new home.

POTENTIAL ALTERNATIVE #5
==========================
1. Obtain a cold backup of all database instances that you want to retain.
2. Recreate the oraInventory for the RDBMS When Missing or Corrupted by using the -attachHome flag of Oracle Universal Installer. The syntax is as follows:

LINUX and AIX
=============
cd $ORACLE_HOME/oui/bin
./runInstaller -silent -attachHome -invPtrLoc /etc/oraInst.loc ORACLE_HOME="" ORACLE_HOME_NAME=""

other platforms
===============
cd $ORACLE_HOME/oui/bin
./runInstaller -silent -attachHome -invPtrLoc /var/opt/oracle/oraInst.loc ORACLE_HOME="" ORACLE_HOME_NAME=""

for 10gR2, this is covered in:
Oracle® Universal Installer and OPatch User's Guide
10g Release 2 (10.2) for Windows and UNIX
Part Number B16227-06
Chapter 3 Managing Oracle Homes
Subsection "Creating the Central Inventory"

for 11gR1, this is covered in:
Oracle® Universal Installer and OPatch User's Guide
11g Release 1 (11.1) for Windows and UNIX
Part Number B31207-04
Chapter 2 Managing Oracle Homes
Subsection "Creating the Central Inventory"

The procedure is also summarized in NOTE 556834.1, "Steps To Recreate Central Inventory(oraInventory) In RDBMS Homes"

POTENTIAL ALTERNATIVE #6
==========================
1. Obtain a cold backup of all database instances that you want to retain.
2. If this is a RAC installation, a corrupted local inventory on one node may be corrected by copying the local inventory from one node to another node, and then recreating the oraInventory. Patch sets and one-off patches applied must be identical across all nodes.

for 10gR2 RAC, this is covered in:
Oracle® Universal Installer and OPatch User's Guide
10g Release 2 (10.2) for Windows and UNIX
Part Number B16227-06
Chapter 3 Managing Oracle Homes
Subsection "Diagnosing and Recovering from RAC Oracle Home Inventory Corruption"

for 11gR1 RAC, this is covered in:
Oracle® Universal Installer and OPatch User's Guide
11g Release 1 (11.1) for Windows and UNIX
Part Number B31207-04
Chapter 2 Managing Oracle Homes
Subsection "Diagnosing and Recovering from RAC Oracle Home Inventory Corruption"

POTENTIAL ALTERNATIVE #7
==========================
1. Obtain a cold backup of all database instances that you want to retain.
2. Implement NOTE 298906.1, "How To Repair A Corrupted Inventory For RDBMS"

POTENTIAL ALTERNATIVE #8
==========================
1. Obtain a cold backup of all database instances that you want to retain.
2. Implement NOTE 438133.1, "How To Merge Multiple oraInventories Into One"

POTENTIAL ALTERNATIVE #9
==========================
1. Obtain a cold backup of all database instances that you want to retain.
2. Find and use the correct Oracle Central Inventory, by implementing NOTE 413829.1 “Opatch Fails With 'Can not get details for given Oracle Home' ”

POTENTIAL ALTERNATIVE #10
==========================
1. Obtain a cold backup of all database instances that you want to retain.
2. It is possible that removing the information about a certain Oracle Home from the Oracle Central Inventory (OCI) might repair that OCI. If you would like to pursue this possibility, please refer to the
"-detachHome " parameter for the "runInstaller" program in NOTE <>, "Oracle Universal Installer (OUI) FAQ "

The syntax is as follows:

cd $ORACLE_HOME/oui/bin
./runInstaller -silent -detachHome ORACLE_HOME="" ORACLE_HOME_NAME=""

==========================

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-751599/,如需轉載,請註明出處,否則將追究法律責任。

相關文章