The Ora DBAPractical Oracle Database Administration Knowledge & Solutions

Saturday, August 29, 2026

Oracle Database 19c Patching Guide: Prechecks, OPatch, Datapatch & Postchecks

Oracle DBA Oracle 19c Database Patching OPatch Datapatch Release Update RU 19.25

Oracle Database patching is a regular responsibility for every DBA. Applying Release Updates (RUs) keeps the database environment current with Oracle fixes, security updates, and product improvements.

In this guide, we will walk through an Oracle Database 19c patching procedure using OPatch and datapatch. The example is based on an actual patching activity where the database was upgraded from 19.18.0.0 to 19.25.0.0 using patch 36912597.

Important: Always review the patch README and Oracle documentation for the exact patch being applied. The commands and paths in this article are based on the environment used during the documented patching activity and should be adapted to your environment.

Environment Used in This Guide

The following environment details were captured during the patching activity.

Parameter Value
Oracle Version Before Patching 19.18.0.0.0
Oracle Version After Patching 19.25.0.0.0
Database Patch 36912597
Release Update 19.25.0.0.241015
OPatch Version 12.2.0.1.45
Oracle Home /u01/app/oracle/product/19.0.0/dbhome_1
Patch Directory /u03/software_dir/36912597

The recorded environment showed Oracle Home /u01/app/oracle/product/19.0.0/dbhome_1 and the patch directory /u03/software_dir/36912597.

What Is the Difference Between OPatch and Datapatch?

Oracle Database patching generally involves two important layers: Oracle Home patching and database SQL patching.

Tool Purpose
opatch Applies the patch to the Oracle Home at the binary level.
datapatch Applies the required SQL changes inside the database.

Therefore, successfully completing opatch apply does not by itself mean that the database patching activity is complete. The SQL portion must also be processed using datapatch -verbose.

Prerequisites

Before starting the patching activity, perform the required prechecks and make sure the maintenance window and rollback plan are available.

  • Confirm the database and Oracle Home to be patched.
  • Verify the current Oracle Database version.
  • Take a backup of the database.
  • Take a backup of the Oracle Home.
  • Confirm sufficient filesystem space is available.
  • Download the required database patch.
  • Download the compatible OPatch utility.
  • Review the patch README and prerequisites.
  • Plan application downtime if required.
  • Ensure no Oracle instance is running from the Oracle Home when applying the binary patch.
Do not start patching without a rollback plan. A full database backup and an Oracle Home backup provide important recovery options if the patching activity encounters a problem.

Step 1: Create a PFILE Backup

As an initial database configuration backup, create a PFILE from the current SPFILE.

SQL> CREATE PFILE='/home/oracle/pfile.ora'
     FROM SPFILE;

Before starting the patching activity, create a PFILE from the current SPFILE. This provides a readable backup of the database initialization parameters and can be used if the SPFILE or instance configuration needs to be restored.

Step 2: Check Database Size

Before maintenance, capture the database size and used space.

SQL> SELECT SUM(bytes/1024/1024/1024)
     "Database Size(GB)"
     FROM dba_data_files;

SQL> SELECT SUM(bytes/1024/1024/1024)
     "Database Used Space(GB)"
     FROM dba_segments;

These values provide a baseline that can be compared after the maintenance activity.

Step 3: Check Database Sessions

Identify active and inactive application sessions before beginning the maintenance.

SQL> SELECT STATUS, COUNT(*)
     FROM V$SESSION
     WHERE STATUS IN ('ACTIVE','INACTIVE')
       AND USERNAME NOT IN ('SYS','SYSTEM')
     GROUP BY STATUS;

This helps identify application activity that needs to be stopped during the maintenance window.

Step 4: Capture Object Count

Capture the current object status as another pre-patching baseline.

SQL> SELECT OWNER,
            STATUS,
            COUNT(*)
     FROM DBA_OBJECTS
     GROUP BY OWNER, STATUS;

The same query can be executed after patching to compare the database object state.

Step 5: Capture Component Status

Query DBA_REGISTRY:

SQL> SELECT COMP_ID,
            COMP_NAME,
            VERSION,
            STATUS
     FROM DBA_REGISTRY;
Example Output
COMP_ID    COMP_NAME                             VERSION     STATUS
---------- ------------------------------------- ----------- ----------
CATALOG    Oracle Database Catalog Views         19.0.0.0.0  VALID
CATPROC    Oracle Database Packages and Types    19.0.0.0.0  VALID
RAC        Oracle Real Application Clusters      19.0.0.0.0  OPTION OFF
JAVAVM     JServer JAVA Virtual Machine          19.0.0.0.0  VALID
XML        Oracle XDK                            19.0.0.0.0  VALID
CATJAVA    Oracle Database Java Packages         19.0.0.0.0  VALID
APS        OLAP Analytic Workspace               19.0.0.0.0  VALID
XDB        Oracle XML Database                   19.0.0.0.0  VALID
OWM        Oracle Workspace Manager              19.0.0.0.0  VALID
CONTEXT    Oracle Text                           19.0.0.0.0  VALID
ORDIM      Oracle Multimedia                     19.0.0.0.0  VALID
SDO        Spatial                               19.0.0.0.0  VALID
XOQ        Oracle OLAP API                       19.0.0.0.0  VALID
OLS        Oracle Label Security                 19.0.0.0.0  VALID
DV         Oracle Database Vault                 19.0.0.0.0  VALID

The pre-patching environment reported the installed Oracle components and their status before applying the new Release Update.

Step 6: Check Existing SQL Patches

Capture the SQL patches already registered in the database.

SQL> SELECT TO_CHAR(ACTION_TIME,'YYYY-MM-DD') AS ACTION_TIME,
            ACTION,
            STATUS,
            DESCRIPTION,
            PATCH_ID
     FROM SYS.DBA_REGISTRY_SQLPATCH
     ORDER BY ACTION_TIME;
Output Before Patching
ACTION_TIME  ACTION     STATUS     DESCRIPTION                                                            PATCH_ID
------------ ---------- ---------- ---------------------------------------------------------------------- ----------
2023-11-29   APPLY      SUCCESS    DATABASE RELEASE UPDATE : 19.18.0.0.230117 (REL-JAN230131) (34765931)  34765931

The environment had Release Update 19.18.0.0.230117 (34765931) registered before the new patch was applied.

Step 7: Take a Full RMAN Backup

Before applying the patch, take a full database backup and a current control file backup.

RMAN> RUN {
       ALLOCATE CHANNEL ch1 DEVICE TYPE DISK;

       CROSSCHECK BACKUP;
       CROSSCHECK ARCHIVELOG ALL;

       BACKUP AS COMPRESSED BACKUPSET
       DATABASE
       FORMAT '/u02/RMAN_BKP/Fullback_%T_%U';

       BACKUP CURRENT CONTROLFILE
       FORMAT '/u02/RMAN_BKP/Controlback_%T_%U';

       RELEASE CHANNEL ch1;
     }

The patching checklist explicitly includes a full backup, backup crosscheck, archivelog crosscheck, database backup, and current control file backup.

Step 8: Unzip the Database Patch and OPatch

Move to the directory where the patch software has been downloaded.

[oracle@dbserver ~]$ cd /u03/software_dir
[oracle@dbserver software_dir]$ ll

-rw-r-----  1 oracle oinstall 1776391552 Apr 19 20:01 p36912597_190000_Linux-x86-64.zip
-rw-r-----  1 oracle oinstall  131979850 Apr 19 20:02 p6880880_190000_Linux-x86-64_version45.zip

The actual environment contained patch 36912597 and the OPatch package p6880880_190000_Linux-x86-64_version45.zip.

Unzip the packages:

[oracle@dbserver software_dir]$ unzip p36912597_190000_Linux-x86-64.zip

[oracle@dbserver software_dir]$ unzip p6880880_190000_Linux-x86-64_version45.zip

After extraction, the database patch was available under /u03/software_dir/36912597:

[oracle@dbserver ~]$ cd /u03/software_dir
[oracle@dbserver software_dir]$ ll

drwxr-xr-x  5 oracle oinstall         81 Oct 11  2024 36912597
drwxr-x--- 15 oracle oinstall       4096 Dec 23 17:17 OPatch
-rw-r-----  1 oracle oinstall 1776391552 Apr 19 20:01 p36912597_190000_Linux-x86-64.zip
-rw-r-----  1 oracle oinstall  131979850 Apr 19 20:02 p6880880_190000_Linux-x86-64_version45.zip
-rw-rw-r--  1 oracle oinstall    2038582 Oct 15  2024 PatchSearch.xml

Step 9: Backup the Existing OPatch Directory

Before replacing OPatch, rename the existing OPatch directory inside $ORACLE_HOME.

[oracle@dbserver ~]$ cd $ORACLE_HOME

[oracle@dbserver dbhome_1]$ mv OPatch OPatch_old

The actual execution shows the existing directory being renamed from OPatch to OPatch_old.

Step 10: Copy the New OPatch Version

Move the newly extracted OPatch directory into the Oracle Home.

[oracle@dbserver ~]$ cd /u03/software_dir
[oracle@dbserver software_dir]$ mv OPatch $ORACLE_HOME

Verify that the new OPatch directory exists.

[oracle@dbserver ~]$ cd $ORACLE_HOME
[oracle@dbserver dbhome_1]$ ls
...
OPatch
OPatch_old
...

Check OPatch Version

[oracle@dbserver dbhome_1]$ cd OPatch

[oracle@dbserver OPatch]$ ./opatch version
Output
OPatch Version: 12.2.0.1.45

OPatch succeeded.

The actual environment reported OPatch version 12.2.0.1.45.

Step 11: Check Patch Conflict

Before applying the patch, perform the OPatch conflict prerequisite check.

[oracle@dbserver 36912597]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u03/software_dir/36912597 -oh $ORACLE_HOME
Output
Oracle Interim Patch Installer version 12.2.0.1.45
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.45
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2025-04-19_20-39-03PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

The actual conflict check completed successfully with no reported conflict.

Conflict Check Passed. The patch can proceed to the next validation stage.

Step 12: Check Available System Space

Verify that the Oracle Home has sufficient filesystem space for the patch.

[oracle@dbserver OPatch]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u03/software_dir/36912597 -oh $ORACLE_HOME/
Output
Oracle Interim Patch Installer version 12.2.0.1.45
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.45
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2025-04-19_20-48-00PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.

The actual environment successfully passed the system-space prerequisite check.

System Space Check Passed. The Oracle Home had sufficient space for the patch operation.

Step 13: Take an Oracle Home Binary Backup

A binary backup of the Oracle Home is recommended before modifying the installation.

13.1 Shutdown the Database

SQL> SHUTDOWN IMMEDIATE;
Output
Database closed.
Database dismounted.
ORACLE instance shut down.

13.2 Stop the Listener

[oracle@dbserver ~]$ lsnrctl stop LISTENER

13.3 Navigate Above ORACLE_HOME

[oracle@dbserver ~]$ cd $ORACLE_HOME
[oracle@dbserver dbhome_1]$ cd ..
[oracle@dbserver 19.0.0]$ cd ..

13.4 Create the Binary Backup

[oracle@dbserver product]$ nohup tar -pcvf \
/u01/app/oracle/product/oracle_home_bkup.tar \
19.0.0 &

The patching checklist records the Oracle Home binary backup as a suggested backup before patching.

Tip: The Oracle Home backup is especially useful when the binary patch needs to be rolled back or the original Oracle Home needs to be restored.

Step 14: Check Currently Applied Binary Patches

Before applying the new patch, capture the patches currently installed in the Oracle Home.

[oracle@dbserver OPatch]$ $ORACLE_HOME/OPatch/opatch lspatches
Output Before Patching
34765931;DATABASE RELEASE UPDATE :
19.18.0.0.230117 (REL-JAN230131)

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

OPatch succeeded.

This gives a useful baseline for confirming that the new Release Update is installed after patching.

Step 15: Apply the Patch at the Binary Level

Now navigate into the OPatch directory and apply patch 36912597.

[oracle@dbserver ~]$ cd $ORACLE_HOME/OPatch

[oracle@dbserver OPatch]$ $ORACLE_HOME/OPatch/opatch apply /u03/software_dir/36912597

OPatch performs prerequisite checks and asks for confirmation before modifying the Oracle Home.

Important Prompts
Oracle Interim Patch Installer version 12.2.0.1.45
Copyright (c) 2025, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.45
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2025-04-19_20-50-51PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   36912597

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/19.0.0/dbhome_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y

The actual patch execution confirmed that all checks passed and then proceeded with patch 36912597.

OPatch then patches the Oracle Home components.

Backing up files...
Applying interim patch '36912597' to OH '/u01/app/oracle/product/19.0.0/dbhome_1'
ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.crypto.rsf, 19.0.0.0.0 ] , [ oracle.pg4appc, 19.0.0.0.0 ] , [ oracle.pg4mq, 19.0.0.0.0 ] , [ oracle.precomp.companion, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.rdbms.tg4db2, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.sdo.companion, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.oid.client, 19.0.0.0.0 ] , [ oracle.xdk.companion, 19.0.0.0.0 ] , [ oracle.options.olap.api, 19.0.0.0.0 ] , [ oracle.ons.eons.bwcompat, 19.0.0.0.0 ] , [ oracle.rdbms.tg4msql, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.rdbms.tg4tera, 19.0.0.0.0 ] , [ oracle.rdbms.tg4ifmx, 19.0.0.0.0 ] , [ oracle.rdbms.tg4sybs, 19.0.0.0.0 ] , [ oracle.ldap.ztk, 19.0.0.0.0 ] , [ oracle.ons.cclient, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.jdk, 1.8.0.191.0 ] , [ oracle.jdk, 1.8.0.391.11 ]  not present in the Oracle Home or a higher version is found.


Patching component oracle.rdbms, 19.0.0.0.0...

Patching component oracle.rdbms.util, 19.0.0.0.0...

Patching component oracle.rdbms.rsf, 19.0.0.0.0...

Patching component oracle.assistants.acf, 19.0.0.0.0...

Patching component oracle.assistants.deconfig, 19.0.0.0.0...

Patching component oracle.assistants.server, 19.0.0.0.0...

Patching component oracle.blaslapack, 19.0.0.0.0...

Patching component oracle.buildtools.rsf, 19.0.0.0.0...

Patching component oracle.ctx, 19.0.0.0.0...

Patching component oracle.dbdev, 19.0.0.0.0...

Patching component oracle.dbjava.ic, 19.0.0.0.0...

Patching component oracle.dbjava.jdbc, 19.0.0.0.0...

Patching component oracle.dbjava.ucp, 19.0.0.0.0...

Patching component oracle.duma, 19.0.0.0.0...

Patching component oracle.javavm.client, 19.0.0.0.0...

Patching component oracle.ldap.owm, 19.0.0.0.0...

Patching component oracle.ldap.rsf, 19.0.0.0.0...

Patching component oracle.ldap.security.osdt, 19.0.0.0.0...

Patching component oracle.marvel, 19.0.0.0.0...

Patching component oracle.network.rsf, 19.0.0.0.0...

Patching component oracle.odbc.ic, 19.0.0.0.0...

Patching component oracle.ons, 19.0.0.0.0...

Patching component oracle.ons.ic, 19.0.0.0.0...

Patching component oracle.oracore.rsf, 19.0.0.0.0...

Patching component oracle.perlint, 5.28.1.0.0...

Patching component oracle.precomp.common.core, 19.0.0.0.0...

Patching component oracle.precomp.rsf, 19.0.0.0.0...

Patching component oracle.rdbms.crs, 19.0.0.0.0...

Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...

Patching component oracle.rdbms.deconfig, 19.0.0.0.0...

Patching component oracle.rdbms.oci, 19.0.0.0.0...

Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...

Patching component oracle.rdbms.scheduler, 19.0.0.0.0...

Patching component oracle.rhp.db, 19.0.0.0.0...

Patching component oracle.rsf, 19.0.0.0.0...

Patching component oracle.sdo, 19.0.0.0.0...

Patching component oracle.sdo.locator.jrf, 19.0.0.0.0...

Patching component oracle.sqlplus, 19.0.0.0.0...

Patching component oracle.sqlplus.ic, 19.0.0.0.0...

Patching component oracle.wwg.plsql, 19.0.0.0.0...

Patching component oracle.xdk.rsf, 19.0.0.0.0...

Patching component oracle.javavm.server, 19.0.0.0.0...

Patching component oracle.xdk.xquery, 19.0.0.0.0...

Patching component oracle.ctx.rsf, 19.0.0.0.0...

Patching component oracle.ovm, 19.0.0.0.0...

Patching component oracle.oraolap, 19.0.0.0.0...

Patching component oracle.nlsrtl.rsf.lbuilder, 19.0.0.0.0...

Patching component oracle.rdbms.rat, 19.0.0.0.0...

Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...

Patching component oracle.rdbms.dv, 19.0.0.0.0...

Patching component oracle.xdk, 19.0.0.0.0...

Patching component oracle.mgw.common, 19.0.0.0.0...

Patching component oracle.ldap.client, 19.0.0.0.0...

Patching component oracle.install.deinstalltool, 19.0.0.0.0...

Patching component oracle.rdbms.rman, 19.0.0.0.0...

Patching component oracle.oraolap.api, 19.0.0.0.0...

Patching component oracle.dbtoolslistener, 19.0.0.0.0...

Patching component oracle.rdbms.drdaas, 19.0.0.0.0...

Patching component oracle.rdbms.hs_common, 19.0.0.0.0...

Patching component oracle.rdbms.lbac, 19.0.0.0.0...

Patching component oracle.sdo.locator, 19.0.0.0.0...

Patching component oracle.rdbms.dm, 19.0.0.0.0...

Patching component oracle.ldap.ssl, 19.0.0.0.0...

Patching component oracle.xdk.parser.java, 19.0.0.0.0...

Patching component oracle.odbc, 19.0.0.0.0...

Patching component oracle.network.listener, 19.0.0.0.0...

Patching component oracle.ctx.atg, 19.0.0.0.0...

Patching component oracle.rdbms.install.common, 19.0.0.0.0...

Patching component oracle.rdbms.hsodbc, 19.0.0.0.0...

Patching component oracle.network.aso, 19.0.0.0.0...

Patching component oracle.rdbms.locator, 19.0.0.0.0...

Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...

Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...

Patching component oracle.nlsrtl.rsf.core, 19.0.0.0.0...

Patching component oracle.nlsrtl.rsf.ic, 19.0.0.0.0...

Patching component oracle.oraolap.dbscripts, 19.0.0.0.0...

Patching component oracle.network.client, 19.0.0.0.0...

Patching component oracle.precomp.common, 19.0.0.0.0...

Patching component oracle.precomp.lang, 19.0.0.0.0...

Patching component oracle.jdk, 1.8.0.201.0...
Successful Completion
Patch 36912597 successfully applied.
Sub-set patch [34765931] has become inactive due to the application of a super-set patch [36912597].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2025-04-19_20-50-51PM_1.log

OPatch succeeded.

Database Patching execution completed successfully and reported that patch 36912597 was successfully applied.

Step 16: Verify the Binary Patch

After the binary patch has been applied, verify the installed patches using opatch lspatches.

[oracle@dbserver OPatch]$ $ORACLE_HOME/OPatch/opatch lspatches
Output
36912597;Database Release Update :
19.25.0.0.241015 (36912597)

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

OPatch succeeded.

The environment changed from the previous 19.18 Release Update to 19.25.0.0.241015.

Binary Patching Completed. Patch 36912597 is now installed in the Oracle Home.

Step 17: Start the Database

After successfully patching the Oracle Home, start the database.

SQL> STARTUP;
Output
ORACLE instance started.

Total System Global Area 4865392352 bytes
Fixed Size                  8949472 bytes
Variable Size            1442840576 bytes
Database Buffers         3405774848 bytes
Redo Buffers                7827456 bytes
Database mounted.
Database opened.

The database started successfully after the binary patch and reported Oracle version 19.25.0.0.0.

Step 18: Run Datapatch

The binary patch updates the Oracle Home, but the database SQL components must also be updated. This is where datapatch is required.

[oracle@dbserver OPatch]$ cd $ORACLE_HOME/OPatch
[oracle@dbserver OPatch]$ $ORACLE_HOME/OPatch/datapatch -verbose
Important Datapatch Output
SQL Patching tool version 19.25.0.0.0 Production on Sat Apr 19 21:02:06 2025
Copyright (c) 2012, 2024, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_229828_2025_04_19_21_02_07/sqlpatch_invocation.log

Connecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of interim SQL patches:
  No interim patches found

Current state of release update SQL patches:
  Binary registry:
    19.25.0.0.0 Release_Update 241010184253: Installed
  SQL registry:
    Applied 19.18.0.0.0 Release_Update 230127005551 successfully on 29-NOV-23 01.46.54.512916 PM

Adding patches to installation queue and performing prereq checks...done
Installation queue:
  No interim patches need to be rolled back
  Patch 36912597 (Database Release Update : 19.25.0.0.241015 (36912597)):
    Apply from 19.18.0.0.0 Release_Update 230127005551 to 19.25.0.0.0 Release_Update 241010184253
  No interim patches need to be applied

Installing patches...



Patch installation complete.  Total patches installed: 1

Validating logfiles...done
Patch 36912597 apply: SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/36912597/25871884/36912597_apply_HHLPRPRD_2025Apr19_21_03_07.log (no errors)
SQL Patching tool complete on Sat Apr 19 21:06:12 2025

The recorded datapatch -verbose execution successfully applied the SQL portion of patch 36912597.

Remember: opatch apply and datapatch perform different parts of the patching process. Always verify both the Oracle Home patch inventory and the database SQL patch registry.

Step 19: Verify Database Component Status

After running datapatch, verify the Oracle component registry again.

SQL> SELECT COMP_ID,
            COMP_NAME,
            VERSION,
            STATUS
     FROM DBA_REGISTRY;
Output
COMP_ID    COMP_NAME                             VERSION     STATUS
---------- ------------------------------------- ----------- ----------
CATALOG    Oracle Database Catalog Views         19.0.0.0.0  VALID
CATPROC    Oracle Database Packages and Types    19.0.0.0.0  VALID
RAC        Oracle Real Application Clusters      19.0.0.0.0  OPTION OFF
JAVAVM     JServer JAVA Virtual Machine          19.0.0.0.0  VALID
XML        Oracle XDK                            19.0.0.0.0  VALID
CATJAVA    Oracle Database Java Packages         19.0.0.0.0  VALID
APS        OLAP Analytic Workspace               19.0.0.0.0  VALID
XDB        Oracle XML Database                   19.0.0.0.0  VALID
OWM        Oracle Workspace Manager              19.0.0.0.0  VALID
CONTEXT    Oracle Text                           19.0.0.0.0  VALID
ORDIM      Oracle Multimedia                     19.0.0.0.0  VALID
SDO        Spatial                               19.0.0.0.0  VALID
XOQ        Oracle OLAP API                       19.0.0.0.0  VALID
OLS        Oracle Label Security                 19.0.0.0.0  VALID
DV         Oracle Database Vault                 19.0.0.0.0  VALID

The post-patching component check in the recorded environment returned the expected component registry with valid statuses.

Step 20: Verify SQL Patch Registry

Now verify that the new SQL patch is registered successfully.

SQL> SELECT TO_CHAR(ACTION_TIME,'YYYY-MM-DD') AS ACTION_TIME,
            ACTION,
            STATUS,
            DESCRIPTION,
            PATCH_ID
     FROM SYS.DBA_REGISTRY_SQLPATCH
     ORDER BY ACTION_TIME;
Final SQL Patch Registry
ACTION_TIME  ACTION     STATUS     DESCRIPTION                                                              PATCH_ID
------------ ---------- ---------- ---------------------------------------------------------------------    ----------
2023-11-29   APPLY      SUCCESS    DATABASE RELEASE UPDATE : 19.18.0.0.230117 (REL-JAN230131) (34765931)    34765931
2025-04-19   APPLY      SUCCESS    Database Release Update : 19.25.0.0.241015 (36912597)                    36912597

The actual database SQL patch registry shows patch 36912597 with status SUCCESS.

SQL Patching Completed. The database SQL registry confirms that Release Update 19.25.0.0.241015 was successfully applied.

Step 23: Recompile Invalid Objects

After patching, recompile invalid database objects.

SQL> @?/rdbms/admin/utlrp.sql

After the recompilation, check the object status again.

SQL> SELECT OWNER,
            STATUS,
            COUNT(*)
     FROM DBA_OBJECTS
     GROUP BY OWNER, STATUS;

Compare the result with the object-count baseline captured before patching.

Step 24: Start the Listener

Once all database checks have completed successfully, start the listener.

[oracle@dbserver ~]$ lsnrctl start LISTENER
Oracle Database Patching Completed. The Oracle Home has been patched to Release Update 19.25.0.0.241015, the SQL patch has been applied using datapatch.

OPatch vs Datapatch — Quick Reference

Stage Command Purpose
Check OPatch ./opatch version Verify the installed OPatch utility.
Conflict Check opatch prereq CheckConflictAgainstOHWithDetail Check patch conflicts with the Oracle Home.
Space Check opatch prereq CheckSystemSpace Verify sufficient space for patching.
Binary Patch ./opatch apply Patch Oracle Home binaries.
Binary Verification ./opatch lspatches Verify installed Oracle Home patches.
SQL Patch ./datapatch -verbose Apply SQL changes to the database.
SQL Verification DBA_REGISTRY_SQLPATCH Verify SQL patch status.

Important Post-Patching Checks

  • Verify the database opens successfully.
  • Verify the Oracle Database version.
  • Verify opatch lspatches.
  • Verify DBA_REGISTRY_SQLPATCH.
  • Check DBA_REGISTRY component status.
  • Recompile invalid objects.
  • Compare object counts against the pre-patching baseline.
  • Check the database alert log for errors.
  • Verify listener status.
  • Verify application connectivity.
  • Check database services and scheduled jobs.
  • Review the OPatch and datapatch log files.

Final Patch Status

Check Before After Status
Database Release Update 19.18.0.0 19.25.0.0 Successful
Database Patch 34765931 36912597 Successful
Binary Patch 19.18 RU 19.25 RU Successful
SQL Patch 19.18 RU 19.25 RU Successful

Conclusion

Oracle Database patching is more than simply executing opatch apply. A successful patching activity requires proper planning, backups, prerequisite validation, Oracle Home patching, SQL patching, and comprehensive post-patching verification.

In this actual patching activity, Oracle Database was upgraded from 19.18.0.0 to 19.25.0.0 using patch 36912597. The Oracle Home binary patch completed successfully, followed by a successful datapatch -verbose execution. The final patch inventory and SQL patch registry confirmed the new Release Update.

Key Takeaway: Always validate both layers of Oracle patching: OPatch for the Oracle Home and datapatch for the database SQL layer. Only after both are successfully verified should the patching activity be considered complete.