Check the Patch Applied to the Oracle Database

check applied patch

In Oracle Database we have multiple ways to find Patch is Applied or not in the Database. Here i give all the ways to get the details about the same. how to check patch is applied or not in oracle, sql query to find patches applied in oracle 11g, How do I know if a patch is applied in Oracle 19c?

Check applied patch list

Here we have two ways to find the patch list and patch list with inventory, check the below commands.

$cd $ORACLE_HOME/OPatch

$ ./opatch lspatches

Check applied patch list with lsinventory

For Linux environment:

$cd /u01/app/oracle/product/11.2.0.4/db_1/OPatch

$ ./opatch lsinventory

Output:

check applied patch

For Windows environment:

>cd %ORACLE_HOME%\OPatch
>opatch lsinventory

Check patches with more details

$cd $ORACLE_HOME/OPatch
$./opatch lsinventory -details

Output Like:

[oracle@ocptechnology OPatch]$ ./opatch lsinventory -details
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0.4/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0.4/db_1/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0.4/db_1/cfgtoollogs/opatch/opatch2022-08-02_16-20-31PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0.4/db_1/cfgtoollogs/opatch/lsinv/lsinventory2022-08-02_16-20-31PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.4.0
There are 1 products installed in this Oracle Home.


Installed Products (136):

Agent Required Support Files                                         10.2.0.4.5
Assistant Common Files                                               11.2.0.4.0
Bali Share                                                           1.1.18.0.0
Buildtools Common Files                                              11.2.0.4.0
Character Set Migration Utility                                      11.2.0.4.0
Cluster Verification Utility Common Files                            11.2.0.4.0
Database Configuration and Upgrade Assistants                        11.2.0.4.0
Database SQL Scripts                                                 11.2.0.4.0
Database Workspace Manager                                           11.2.0.4.0
Deinstallation Tool                                                  11.2.0.4.0
Enterprise Edition Options                                           11.2.0.4.0
Enterprise Manager Agent                                             10.2.0.4.5
Enterprise Manager Agent Core Files                                  10.2.0.4.5
Enterprise Manager Common Core Files                                 10.2.0.4.5
Enterprise Manager Common Files                                      10.2.0.4.5
Enterprise Manager Database Plugin -- Agent Support                  11.2.0.4.0
Enterprise Manager Database Plugin -- Repository Support             11.2.0.4.0
Enterprise Manager Grid Control Core Files                           10.2.0.4.5
Enterprise Manager plugin Common Files                               11.2.0.4.0
Enterprise Manager Repository Core Files                             10.2.0.4.5
Exadata Storage Server                                               11.2.0.1.0
Expat libraries                                                       2.0.1.0.1
Generic Connectivity Common Files                                    11.2.0.4.0
HAS Common Files                                                     11.2.0.4.0
HAS Files for DB                                                     11.2.0.4.0
Installation Common Files                                            11.2.0.4.0
Installation Plugin Files                                            11.2.0.4.0
Installer SDK Component                                              11.2.0.4.0
JAccelerator (COMPANION)                                             11.2.0.4.0
Java Development Kit                                                1.5.0.51.10
LDAP Required Support Files                                          11.2.0.4.0
OLAP SQL Scripts                                                     11.2.0.4.0
Oracle 11g Warehouse Builder Required Files                          11.2.0.4.0
Oracle Advanced Security                                             11.2.0.4.0
Oracle Application Express                                           11.2.0.4.0
Oracle Call Interface (OCI)                                          11.2.0.4.0
Oracle Clusterware RDBMS Files                                       11.2.0.4.0
Oracle Code Editor                                                   1.2.1.0.0I
Oracle Configuration Manager                                         10.3.8.1.0
Oracle Configuration Manager Client                                  10.3.2.1.0
Oracle Configuration Manager Deconfiguration                         10.3.1.0.0
Oracle Containers for Java                                           11.2.0.4.0
Oracle Core Required Support Files                                   11.2.0.4.0
Oracle Data Mining RDBMS Files                                       11.2.0.4.0
Oracle Database 11g                                                  11.2.0.4.0
Oracle Database 11g                                                  11.2.0.4.0
Oracle Database 11g Multimedia Files                                 11.2.0.4.0
Oracle Database Deconfiguration                                      11.2.0.4.0
Oracle Database Gateway for ODBC                                     11.2.0.4.0
Oracle Database User Interface                                       2.2.13.0.0
Oracle Database Utilities                                            11.2.0.4.0
Oracle Database Vault J2EE Application                               11.2.0.4.0
Oracle Database Vault option                                         11.2.0.4.0
Oracle DBCA Deconfiguration                                          11.2.0.4.0
Oracle Display Fonts                                                  9.0.2.0.0
Oracle Enterprise Manager Console DB                                 11.2.0.4.0
Oracle Extended Windowing Toolkit                                    3.4.47.0.0
Oracle Globalization Support                                         11.2.0.4.0
Oracle Globalization Support                                         11.2.0.4.0
Oracle Help For Java                                                  4.2.9.0.0
Oracle Help for the  Web                                             2.0.14.0.0
Oracle Ice Browser                                                    5.2.3.6.0
Oracle Internet Directory Client                                     11.2.0.4.0
Oracle Java Client                                                   11.2.0.4.0
Oracle JDBC Server Support Package                                   11.2.0.4.0
Oracle JDBC/OCI Instant Client                                       11.2.0.4.0
Oracle JDBC/THIN Interfaces                                          11.2.0.4.0
Oracle JFC Extended Windowing Toolkit                                4.2.36.0.0
Oracle JVM                                                           11.2.0.4.0
Oracle Label Security                                                11.2.0.4.0
Oracle LDAP administration                                           11.2.0.4.0
Oracle Locale Builder                                                11.2.0.4.0
Oracle Message Gateway Common Files                                  11.2.0.4.0
Oracle Multimedia                                                    11.2.0.4.0
Oracle Multimedia Annotator                                          11.2.0.4.0
Oracle Multimedia Client Option                                      11.2.0.4.0
Oracle Multimedia Java Advanced Imaging                              11.2.0.4.0
Oracle Multimedia Locator                                            11.2.0.4.0
Oracle Multimedia Locator RDBMS Files                                11.2.0.4.0
Oracle Net                                                           11.2.0.4.0
Oracle Net Listener                                                  11.2.0.4.0
Oracle Net Required Support Files                                    11.2.0.4.0
Oracle Net Services                                                  11.2.0.4.0
Oracle Netca Client                                                  11.2.0.4.0
Oracle Notification Service                                          11.2.0.3.0
Oracle Notification Service (eONS)                                   11.2.0.4.0
Oracle ODBC Driver                                                   11.2.0.4.0
Oracle ODBC Driverfor Instant Client                                 11.2.0.4.0
Oracle OLAP                                                          11.2.0.4.0
Oracle OLAP API                                                      11.2.0.4.0
Oracle OLAP RDBMS Files                                              11.2.0.4.0
Oracle One-Off Patch Installer                                       11.2.0.3.4
Oracle Partitioning                                                  11.2.0.4.0
Oracle Programmer                                                    11.2.0.4.0
Oracle Quality of Service Management (Client)                        11.2.0.4.0
Oracle RAC Deconfiguration                                           11.2.0.4.0
Oracle RAC Required Support Files-HAS                                11.2.0.4.0
Oracle Real Application Testing                                      11.2.0.4.0
Oracle Recovery Manager                                              11.2.0.4.0
Oracle Security Developer Tools                                      11.2.0.4.0
Oracle Spatial                                                       11.2.0.4.0
Oracle SQL Developer                                                 11.2.0.4.0
Oracle Starter Database                                              11.2.0.4.0
Oracle Text                                                          11.2.0.4.0
Oracle Text Required Support Files                                   11.2.0.4.0
Oracle UIX                                                           2.2.24.6.0
Oracle Universal Connection Pool                                     11.2.0.4.0
Oracle Universal Installer                                           11.2.0.4.0
Oracle USM Deconfiguration                                           11.2.0.4.0
Oracle Wallet Manager                                                11.2.0.4.0
Oracle XML Development Kit                                           11.2.0.4.0
Oracle XML Query                                                     11.2.0.4.0
Parser Generator Required Support Files                              11.2.0.4.0
Perl Interpreter                                                     5.10.0.0.2
Perl Modules                                                         5.10.0.0.1
PL/SQL                                                               11.2.0.4.0
PL/SQL Embedded Gateway                                              11.2.0.4.0
Platform Required Support Files                                      11.2.0.4.0
Precompiler Common Files                                             11.2.0.4.0
Precompiler Required Support Files                                   11.2.0.4.0
Provisioning Advisor Framework                                       10.2.0.4.3
RDBMS Required Support Files                                         11.2.0.4.0
RDBMS Required Support Files for Instant Client                      11.2.0.4.0
RDBMS Required Support Files Runtime                                 11.2.0.4.0
regexp                                                                2.1.9.0.0
Required Support Files                                               11.2.0.4.0
Sample Schema Data                                                   11.2.0.4.0
Secure Socket Layer                                                  11.2.0.4.0
SQL*Plus                                                             11.2.0.4.0
SQL*Plus Files for Instant Client                                    11.2.0.4.0
SQL*Plus Required Support Files                                      11.2.0.4.0
SQLJ Runtime                                                         11.2.0.4.0
SSL Required Support Files for InstantClient                         11.2.0.4.0
XDK Required Support Files                                           11.2.0.4.0
XML Parser for Java                                                  11.2.0.4.0
XML Parser for Oracle JVM                                            11.2.0.4.0
There are 136 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


--------------------------------------------------------------------------------

OPatch succeeded.

SQL command to check Applied patches

We have two different query to check applied pathces details in oracle database.

Command for Oracle 11G

Use the below command to for oracle 11g Database version, login with sys user in database and run the below command.

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;

Command for Oracle 12C

In oracle 12c litle change in query, login as sys user and run the below query.

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;

Connect with us on Social Network 👇

Leave a Reply

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

Scroll to Top