Home > DBA Scripts, OPatch, Oracle, Patching > Oracle – Opatch

Oracle – Opatch

Opatch is an Oracle utility for the application and rolling back of interim patches to the Oracle RDBMS.  In order to use opatch it is recommended to set its location in $PATH.


OPatch can be found under $ORACLE_HOME/OPatch

Current Patch History

To find the current patch history run the following:

$ opatch lsinventory [ -all ] [ -i[nvPtrLoc] <Path to oraInst.loc> ][ -oh <ORACLE_HOME>]

– list all patches currently applied.

OPatch Version

$ sh opatch version
Invoking OPatch
OPatch Version:
OPatch succeeded.

OPatch Apply

$ opatch apply [-f[orce]] [-i[nvPtrLoc]<path to oraInst.log] [-m[inimize_downtime]] [-n[o_inventory]] [-oh<ORACLE_HOME>] [<patch_location>]

– used to remove any conflicting patches and force the patch to be applied


– used to locate the oraInst.loc file


– used only in RAC instances, allowing for the remaining instances to remain up during patching. It is the responsibility of the user to shutdown each instance before applying the patches, after the last instance is patched then all instances can be brought back up.


– This only works if the inventory is unavailable and allows for bypassing the inventory for reading and updates.


– Directory to be used instead of the default $ORACLE_HOME


– Where to install the patch from

OPatch Rollback

Sometimes it is necessary to rollback a patch once it has been applied.

$ opatch rollback -id patch_id [-i[nvPtrLoc]<Path to oraInst.loc>] [-oh <ORACLE_HOME>] -pj patch_dir

– The id of the patch that requires rollback


– The directory that is a valid patch area.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: