Tuesday, 30 April 2013

"opatch lsinventory" and "opatch apply" errors and easy fix

This is an annoying error message that we receive sometimes, when trying to check which patches we have applied or even when trying to apply a DB patch. The output below is for version 11.1:


mybox@TESTDB]/u01/app/oracle/product/11.1.0.7/OPatch >./opatch lsinventory
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/app/oracle/product/11.1.0.7
Central Inventory : n/a
   from           :
OPatch version    : 11.1.0.6.2
OUI version       : 11.1.0.7.0
OUI location      : /u01/app/oracle/product/11.1.0.7/oui
Log file location : n/a

OPatch cannot find a valid oraInst.loc file to locate Central Inventory.

OPatch failed with error code 104


We are getting similar error when trying to apply the patch:

[mybox@TESTDB]/u01/app/oracle/product/9393222 >/u01/app/oracle/product/11.1.0.7/OPatch/opatch apply
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/app/oracle/product/11.1.0.7
Central Inventory : n/a
   from           :
OPatch version    : 11.1.0.6.2
OUI version       : 11.1.0.7.0
OUI location      : /u01/app/oracle/product/11.1.0.7/oui
Log file location : n/a

OPatch cannot find a valid oraInst.loc file to locate Central Inventory.

OPatch failed with error code 104

In both cases, the fix is very easy:

[mybox@TESTDB]/u01/app/oracle/product/11.1.0.7/OPatch >./opatch lsinventory -invPtrLoc /u01/app/oracle/oraInventory/oraInst.loc


 Same fix for similar error when applying the patch:

[anacaj@CAMSSDB]/u01/app/oracle/product/9393222 >/u01/app/oracle/product/11.1.0.7/OPatch/opatch apply -invPtrLoc /u01/app/oracle/oraInventory/oraInst.loc


2 comments:

  1. A handy way to verify the opatch actions, without actually executing them, but just printing on the screen:

    cd
    $ORACLE_HOME/OPatch/opatch apply -report -invPtrLoc /u01/app/oracle/product/11.1.0.7/oraInst.loc

    ReplyDelete
    Replies
    1. NOTE:

      The runInstaller has the same option, -invPtrLoc /u01/app/oracle/oraInventory/oraInst.loc, to change the default oraInventory location.

      Delete