A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

Check the Patch Applied to the Oracle Database

2 min read
You can use Oracle OPatch utility to check all the Oracle Patches applied in Oracle database. opatch utility is located under $ORACLE_HOME/OPatch directory.
Run the opatch lsinventory command to get the list of interim patches applied.
$ORACLE_HOME/OPatch/opatch lsinventory

Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2021, Oracle Corporation. All rights reserved.

Oracle Home : /u02/app/oracle/product/19.0.0.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u02/app/oracle/product/19.0.0.0/dbhome_2/oraInst.loc
OPatch version : 12.2.0.1.21
OUI version : 12.2.0.7.0
Log file location : /u02/app/oracle/product/19.0.0.0/dbhome_2/cfgtoollogs/opatch/opatch2021-01-21_09-22-45AM_1.log

Lsinventory Output file location : /u02/app/oracle/product/19.0.0.0/dbhome_2/cfgtoollogs/opatch/lsinv/lsinventory2021-01-21_09-22-45AM.txt
1. Listing Applied Patches
[oracle@localhost bin]$ $ORACLE_HOME/OPatch/opatch lspatches
30503372;OJVM PATCH SET UPDATE 11.2.0.4.200114
29938455;OCW Patch Set Update : 11.2.0.4.191015 (29938455)
30310975;DATABASE PATCH FOR EXADATA (Jan 2020 - 11.2.0.4.200114) : (30310975)
2. Using opatch lsinventory
[oracle@localhost bin]$  $ORACLE_HOME/OPatch/opatch lsinventory|grep "Patch description"

or,


--on Windows:

%ORACLE_HOME%\opatch\opatch lsinventory -details

--on linux

$ORACLE_HOME/OPatch/opatch lsinventory -details
3. To get information on particular patch ID/ Check patch is applied or not with DBMS package
--- Put patch number which you want to check


select xmltransform(dbms_qopatch.is_patch_installed('29494060'),dbms_qopatch.get_opatch_xslt) "Patch installed?" from dual;
4. Command for Oracle 11G
COLUMN action_time FORMAT A20
COLUMN action FORMAT A20
COLUMN version FORMAT A10
COLUMN comments FORMAT A30
COLUMN bundle_series FORMAT A10
set lin 300 pagesize 200

SELECT TO_CHAR(action_time, 'DD-MON-YYYY HH24:MI:SS') AS action_time,
action, version, id, comments, bundle_series
FROM   sys.registry$history
ORDER by action_time;
5. Command for Oracle 12C and higher.
col action_time for a28
col action for a8
col version for a8
col comments for a30
col status for a10
set line 999 pages 999

select patch_id,  version, status, Action,Action_time from dba_registry_sqlpatch order by action_time;