OPatch Command Usage for Oracle Patch Management

Share

ADVERTISEMENT

A collection of essential OPatch commands for managing Oracle patches, including listing inventory, applying/rolling back patches, checking conflicts, and handling multiple inventory locations. This guide ensures efficient patch management for Oracle environments.

Serial No.ActionCommand and Description
1List inventory details of patch$ORACLE_HOME/OPatch/opatch lsinventory
List all patch inventory details applied to the Oracle home.
2List patchsets applied$ORACLE_HOME/OPatch/opatch lspatches
List all patches currently applied to the Oracle home.
3Find OPatch version$ORACLE_HOME/OPatch/opatch version
Find the version of OPatch installed in the Oracle home.
4Find details of a particular patch$ORACLE_HOME/OPatch/opatch query -all {PATCH_PATH}
Query a specific patch’s details before applying.
$ORACLE_HOME/OPatch/opatch query -all /software/PSUPATCH/30089984
Example to find details for a specific patch.
5Apply a patch to RDBMS homecd /SOFTWARE/PSUPATCH/30089984
$ORACLE_HOME/OPatch/opatch apply
Apply a patch to the RDBMS home.
6Rollback a patch from RDBMS home$ORACLE_HOME/OPatch/opatch rollback -id [patch_id]
Rollback a specific patch from the RDBMS home.
$ORACLE_HOME/OPatch/opatch rollback -id 30089984
Example rollback of a patch.
7Apply one-off patch in Grid Homeroot# $GI_HOME/crs/install/rootcrs.sh -prepatch
Apply one-off patch in the Grid Home.
oracle$ cd /SOFTWARE/PSUPATCH/30089984
$GRID_HOME/OPatch/opatch apply
Apply the patch in Grid Home.
root# $GI_HOME/crs/install/rootcrs.sh -postpatch
Run the post-patch script.
8Check conflict against ORACLE_HOMEcd 27734982
[27734982]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Check for any conflicts with the Oracle Home.
9Check whether active executables are runningcd 27734982
[27734982]$ $ORACLE_HOME/OPatch/opatch prereq CheckActiveFilesAndExecutables -ph ./
Check if any active executables are running.
10Opatch command using different inventory location$ORACLE_HOME/OPatch/opatch lsinventory -invPtrLoc /etc/orainv/orainventory
List inventory details using a custom inventory location.
Table: Essential OPatch Commands for Oracle Patch Management

ADVERTISEMENT

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *