Oracle OPatch Failure & OPatch Rollback

OPatch Failure

I was encountering an OPatch failure during my Oracle Application Server 10g upgrade. The reason is that our previous developers failed during the last patch installation. The failure message is displayed below:

      Interim Patch is holding the lock from xxxxxxx

It looked like during the last unsuccessful patch installation. Patch number xxxxxxx acquired the patch lock but not released it. When the new patch was trying to aquire the same lock. It would be on hold. This information is generated during the last patch run and stored in the patch_locked file under the directory:

       $ORACLE_HOME/.patch_storage

If some interruption happened during an unsuccessful installation of the patches, the locks would not be released and this file would not be removed as well. Therefore, the following patch installation would encounter the share lock issue further caused by this file.

    Delete this file and then reinstall the patch. You would be good to go!

OPatch Rollback

Sometimes when you applied the patches, there would be some incompatiabity that would arise in the system. This new upgrade needs to be rolled back to keep the original environment.

Here are two useful commands for checking the version and the list of pathes that are touched.

opatch version

opatch lsinventory

Suppose my OAS Home is under /oracle/app/10gR3mid

Suppose you put your opatch folder temporarily under /tmp and under the tmp folder there is patch folder : 10031961

Run the command below marked in red in each subfolder of 10031961, suppose we would firstly rollback 10011970

So let us look at the before and after results from running opatch lsinventory

Before we apply the patch rollback, you could see the patch number exsits in the red box. 

After we apply the rollback it is gone.

2 thoughts on “Oracle OPatch Failure & OPatch Rollback

  1. Hi Claire Hu,
    here is the output for the concern output for the query..

    [oracle@DELfgtdb001 OPatch]$ opatch ls -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.

    Syntax Error… Unrecognized Command or Option: 1st argument must be one of the following:
    apply
    napply
    rollback
    nrollback
    lsinventory
    lsinv
    query
    util
    prereq
    version
    -help
    -h
    Please use the option ‘opatch -help’ to get correct syntax

    OPatch failed with error code 14

    Regards,
    Vineeth.M

  2. Hi, Vineeth. M
    Your command “ls -all” is not recognized as opatch commands. You would need to use “opatch lsinventory” if you want to list out the existing patches on the server.
    Hope this would help!

    Best
    Claire

Leave a comment