Wednesday, September 16, 2015

Oracle Which Patch has been applied?

In the events when you want to know what all patches have been applied to the oracle database, you can just goto oracle_home/opatch and type lsinventory. but you can also do the same by using the below query in the database. 

Which Patch has been applied?

SET linesize 200 pagesize 200
col action_time FOR a28
col version FOR a10
col comments FOR a35
col action FOR a25
col namespace FOR a12

SELECT * FROM registry$history;

ACTION_TIME                  ACTION                    NAMESPACE    VERSION            ID COMMENTS                         BUNDLE_SERIES
---------------------------- ------------------------- ------------ ---------- ---------- ----------------------------------- ------------------------------
24-AUG-13 PM APPLY                     SERVER            0 Patchset              PSU
18-DEC-13 PM APPLY                     SERVER            0 Patchset              PSU
09-NOV-14 PM APPLY                     SERVER            4 PSU                   PSU
08-MAR-15 PM APPLY                     SERVER            5 PSU                   PSU

Which Patch has been installed?

The easies way to list the installed patches in the current ORACLE_HOME is to use the patch utility.
List of installed patches:
$ORACLE_HOME/OPatch/opatch lsinventory

Grep on the patch description:
$ORACLE_HOME/OPatch/opatch lsinventory|grep "Patch description"
Patch description:  "Database Patch Set Update : (16619892)"

A more detailed list on the installed patches:
$ORACLE_HOME/OPatch/opatch lsinventory -details

No comments :

Post a Comment