Oracle 19c | Applying Patch

Much of the times I use latest Oracle technologies for learning & they hardly make to any of the PRODUCTION environments those I support at work. Recently I wanted to see how to patch Oracle 19c installation on Windows and to be frank, it was buttery smooth.

Let us quickly see how to apply a patch to a Windows installation of Oracle 19c database.

Shutdown all instances & Windows services for Oracle. Make sure you have taken adequate number of backups for the database(s).

Check you computer’s PATH variable. Insure you have %ORACLE_HOME%\perl\bin, in my case “D:\Oracle\19c\perl\bin” as the first entry for PERL.

This is how the PATH information before I make the above changes to it.

Here 11g 32Bit client is the first Oracle software in the PATH, we will modify it like below

Once the patching done, you can rollback the PATH variable according to your requirements.

Visit Oracle support and download the patch, the latest patch for Oracle Database 19c is “32409154”. Patch is only available to customers with a valid support contract.

Extract the archive.

I’ve extracted the archive within the Download folder and the path is


Now open an elevated command prompt and switch to the folder with patch number as it’s name. Check the below image for details.

Now we are ready to apply the patch.

Call the opatch utility from here, like given example below.

Microsoft Windows [Version 10.0.19043.985]
(c) Microsoft Corporation. All rights reserved.

C:\Oracle19c_Patch\p32409154_190000_MSWIN-x86-64\32409154>d:\Oracle\19c\OPatch\opatch apply
Oracle Interim Patch Installer version
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

Oracle Home       : d:\Oracle\19c
Central Inventory : C:\Program Files\Oracle\Inventory
   from           :
OPatch version    :
OUI version       :
Log file location : d:\Oracle\19c\cfgtoollogs\opatch\opatch2021-06-23_10-47-41AM_1.log

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

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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = 'd:\Oracle\19c')

Is the local system ready for patching? [y|n]
User Responded with: Y
Backing up files...
Applying interim patch '32409154' to OH 'd:\Oracle\19c'
ApplySession: Optional component(s) [ oracle.assistants.usm, ] , [ oracle.rdbms.ic, ] , [ oracle.rdbms.tg4ifmx, ] , [ oracle.has.deconfig, ] , [ oracle.swd.oui, ] , [ oracle.has.cfs, ] , [ oracle.rdbms.tg4tera, ] , [, ] , [, ] , [ oracle.rdbms.tg4msql, ] , [ oracle.ons.daemon, ] , [ oracle.options.olap.awm, ] , [ oracle.rdbms.tg4db2, ] , [ oracle.assistants.asm, ] , [ oracle.usm, ] , [ oracle.swd.oui.core.min, ] , [, ] , [ oracle.options.olap, ] , [, ] , [ oracle.tfa, ] , [ oracle.has.cvu, ] , [ oracle.rdbms.tg4sybs, ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.sdo,

Patching component oracle.rdbms.rman,

Patching component oracle.aspnet_2,

Patching component oracle.dbjava.ic,

Patching component oracle.ons,

Patching component oracle.ntoramts,

Patching component oracle.rdbms.dbscripts,

Patching component oracle.nlsrtl.rsf,

Patching component,

Patching component oracle.rdbms,

Patching component oracle.blaslapack,

Patching component oracle.rdbms.oci,

Patching component oracle.assistants.acf,

Patching component oracle.duma,

Patching component oracle.sdo.locator.jrf,

Patching component oracle.tfa.db,

Patching component,

Patching component oracle.ctx.atg,

Patching component oracle.xdk.rsf,

Patching component oracle.precomp.common,

Patching component oracle.dbjava.jdbc,

Patching component oracle.rdbms.hsodbc,

Patching component oracle.sqlplus.ic,

Patching component oracle.oracore.rsf,

Patching component oracle.rsf,

Patching component oracle.precomp.common.core,

Patching component,

Patching component oracle.precomp.lang,

Patching component oracle.install.deinstalltool,

Patching component oracle.ctx,

Patching component oracle.dbjava.ucp,

Patching component oracle.javavm.client,

Patching component,

Patching component oracle.ntoledb.odp_net_2,

Patching component oracle.rdbms.util,

Patching component oracle.rdbms.lbac,

Patching component oracle.usm.deconfig,

Patching component oracle.assistants.server,

Patching component oracle.rdbms.deconfig,

Patching component oracle.ntoledb,

Patching component oracle.has.common,

Patching component oracle.assistants.deconfig,

Patching component oracle.ldap.rsf,

Patching component oracle.ovm,

Patching component oracle.has.db,

Patching component oracle.rdbms.plsql,

Patching component oracle.precomp.rsf,

Patching component oracle.xdk.xquery,

Patching component oracle.javavm.server,

Patching component oracle.xdk,

Patching component oracle.dbdev,

Patching component oracle.sdo.locator,

Patching component oracle.rdbms.install.plugins,

Patching component oracle.rdbms.olap,

Patching component oracle.rdbms.scheduler,

Patching component oracle.rdbms.rsf.ic,

Patching component oracle.ldap.owm,

Patching component oracle.rdbms.rsf,

Patching component oracle.mgw.common,

Patching component,

Patching component oracle.oraolap,

Patching component oracle.clrintg.ode_net_2,

Patching component oracle.rdbms.dv,

Patching component oracle.has.rsf,

Patching component oracle.odbc.ic,

Patching component oracle.sqlplus,

Patching component oracle.has.common.cvu,
Patch 32409154 successfully applied.
Log file location: d:\Oracle\19c\cfgtoollogs\opatch\opatch2021-06-23_10-47-41AM_1.log

OPatch succeeded.

As usual, based on your computer’s hardware capabilities, the patch would finish sooner or later. There will be 2 prompts those you need to say Yes in order to progress the patching.

Simple & neat right? Share your experience in the comments area.

Oracle PL/SQL | Exiting without executing rest of the code block

One of the major confusions for a PL/SQL programming beginners is how to exit a code block when a specific exception happens. Today we will see how we can handle these situation using user defined exceptions.

A developer can define as many exceptions for the code block and raise them as and when needed, than the default exception block for a BEGIN..END; block

Here I am trying to explain how a PL/SQL developer could exit the execution as soon as the first exception happens.


    l_number NUMBER := 11;
    myexp EXCEPTION;
        IF l_number = 10 THEN
            RAISE myexp;
        END IF;
        WHEN myexp THEN
            dbms_output.put_line('Okay, let us exit');

        dbms_output.put_line('Looks like there were no exceptions, let us show this!');

The above example is trying to demonstrate how the exceptions are handled by dividing the code into multiple BEGIN..END blocks. So here I am doing a check whether the “l_number” is 10 and to raise an user defined exception and by merely calling RETURN exit the complete PL/SQL block! As simple as it looks here.

Give it a try by change the l_number value to 10 at the declaration level and see yourself. Happy coding!