{"id":852,"date":"2024-12-24T13:52:32","date_gmt":"2024-12-24T13:52:32","guid":{"rendered":"https:\/\/w3buddy.com\/?p=852"},"modified":"2026-01-15T13:15:58","modified_gmt":"2026-01-15T07:45:58","slug":"opatch-command-usage-for-oracle-patch-management","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/opatch-command-usage-for-oracle-patch-management\/","title":{"rendered":"OPatch Command Usage for Oracle Patch Management"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong>Serial No.<\/strong><\/th><th><strong>Action<\/strong><\/th><th><strong>Command and Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>List inventory details of patch<\/td><td><code>$ORACLE_HOME\/OPatch\/opatch lsinventory<\/code><br>List all patch inventory details applied to the Oracle home.<\/td><\/tr><tr><td>2<\/td><td>List patchsets applied<\/td><td><code>$ORACLE_HOME\/OPatch\/opatch lspatches<\/code><br>List all patches currently applied to the Oracle home.<\/td><\/tr><tr><td>3<\/td><td>Find OPatch version<\/td><td><code>$ORACLE_HOME\/OPatch\/opatch version<\/code><br>Find the version of OPatch installed in the Oracle home.<\/td><\/tr><tr><td>4<\/td><td>Find details of a particular patch<\/td><td><code>$ORACLE_HOME\/OPatch\/opatch query -all {PATCH_PATH}<\/code><br>Query a specific patch&#8217;s details before applying.<\/td><\/tr><tr><td><\/td><td><\/td><td><code>$ORACLE_HOME\/OPatch\/opatch query -all \/software\/PSUPATCH\/30089984<\/code><br>Example to find details for a specific patch.<\/td><\/tr><tr><td>5<\/td><td>Apply a patch to RDBMS home<\/td><td><code>cd \/SOFTWARE\/PSUPATCH\/30089984<\/code><br><code>$ORACLE_HOME\/OPatch\/opatch apply<\/code><br>Apply a patch to the RDBMS home.<\/td><\/tr><tr><td>6<\/td><td>Rollback a patch from RDBMS home<\/td><td><code>$ORACLE_HOME\/OPatch\/opatch rollback -id [patch_id]<\/code><br>Rollback a specific patch from the RDBMS home.<\/td><\/tr><tr><td><\/td><td><\/td><td><code>$ORACLE_HOME\/OPatch\/opatch rollback -id 30089984<\/code><br>Example rollback of a patch.<\/td><\/tr><tr><td>7<\/td><td>Apply one-off patch in Grid Home<\/td><td><code>root# $GI_HOME\/crs\/install\/rootcrs.sh -prepatch<\/code><br>Apply one-off patch in the Grid Home.<\/td><\/tr><tr><td><\/td><td><\/td><td><code>oracle$ cd \/SOFTWARE\/PSUPATCH\/30089984<\/code><br><code>$GRID_HOME\/OPatch\/opatch apply<\/code><br>Apply the patch in Grid Home.<\/td><\/tr><tr><td><\/td><td><\/td><td><code>root# $GI_HOME\/crs\/install\/rootcrs.sh -postpatch<\/code><br>Run the post-patch script.<\/td><\/tr><tr><td>8<\/td><td>Check conflict against ORACLE_HOME<\/td><td><code>cd 27734982<\/code><br><code>[27734982]$ $ORACLE_HOME\/OPatch\/opatch prereq CheckConflictAgainstOHWithDetail -ph .\/<\/code><br>Check for any conflicts with the Oracle Home.<\/td><\/tr><tr><td>9<\/td><td>Check whether active executables are running<\/td><td><code>cd 27734982<\/code><br><code>[27734982]$ $ORACLE_HOME\/OPatch\/opatch prereq CheckActiveFilesAndExecutables -ph .\/<\/code><br>Check if any active executables are running.<\/td><\/tr><tr><td>10<\/td><td>Opatch command using different inventory location<\/td><td><code>$ORACLE_HOME\/OPatch\/opatch lsinventory -invPtrLoc \/etc\/orainv\/orainventory<\/code><br>List inventory details using a custom inventory location.<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Table: Essential OPatch Commands for Oracle Patch Management<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>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. Action Command and Description 1 List inventory details of patch $ORACLE_HOME\/OPatch\/opatch lsinventoryList all patch inventory details applied to the Oracle home. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1225],"tags":[],"class_list":["post-852","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=852"}],"version-history":[{"count":2,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/852\/revisions"}],"predecessor-version":[{"id":1537,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/852\/revisions\/1537"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}