How to apply patch 19.20.0.0 on Oracle Database

In this entry we are going to describe how to apply a patch to our database. In this example, our database is in version 19.3.0.0.0 and we are going to apply the patch 19.20.0.0(Patch 35320081: DATABASE RELEASE UPDATE 19.20.0.0.0.0), although the procedure is usually similar I always recommend to read the README of the patches to have clear the steps of the same one if you follow this guide to apply a different patch. In our case we will patch a local database, without ASM and in "No Rolling" mode, i.e. with database stop.

First of all, how is logical is to know the current patch version of our database, we can do it in several ways, one of them is the following.
With the environment variables of the database to patch loaded, we launch the following command (opatch lspatches).

[oracle@localhost OPatch]$ ./opatch lspatches
29585399;OCW RELEASE UPDATE 19.3.0.0.0.0 (29585399)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)
OPatch succeeded.

In our case the database is at release 19.3.0.0.0.
We download the 19.20.20.0.0.0 patch from the official Oracle website, in our case for Linux x86-64.

Before being able to apply the patch, and as indicated in the README of the patch prerequisites, it is necessary to have Opatch version 12.2.0.1.37 or higher. I always advise to download the latest version of OPatch available.

1) We download the OPatch from the following Oracle address.
https://updates.oracle.com/download/6880880.html

Currently the available version is version 12.2.0.1.40

To apply this version, go to the ORACLE_HOME of your database, rename the current directory "OPatch" and unzip the newly downloaded patch.

[oracle@localhost sw]$ cd $ORACLE_HOME
[oracle@localhost sw]$ mv OPatch/ OPatch_old
[oracle@localhost sw]$ unzip p6880880_190000_Linux-x86-64.zip
Archive: p6880880_190000_Linux-x86-64.zip
creating: OPatch/
creating: OPatch/docs/
inflating: OPatch/docs/cversion.txt
inflating: OPatch/docs/Users_Guide.txt
inflating: OPatch/docs/Prereq_Users_Guide.txt
inflating: OPatch/docs/FAQ
.
.
. .
.

We check that the OPatch version is correct.

[oracle@localhost OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.40
OPatch succeeded.

2) Unzip the patch
cd /tmp/parche1920/35320081
unizp p35320081_190000_Linux-x86-64.zip

ls -lrt /tmp/parche1920/35320081
drwxr-xr-x. 5 oracle oracle 4096 Jul 15 21:54 35320081
-rw-rw-rw-r-. 1 oracle oracle 1749054 Jul 18 15:03 PatchSearch.xml
-rw-rw-rw-r-. 1 oracle oracle 1769419773 Nov 15 17:54 p35320081_190000_Linux-x86-64.zip

3) We run the Precheck to check that there are no discrepancies.
Inside the directory created when unzipping (/tmp/parche1920/35320081/35320081), we launch the following command:

opatch prereq CheckConflictAgainstOHWithDetail -ph ./

opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Temporary Patch Installer version 12.2.0.1.40
Copyright (c) 2023, Oracle Corporation. All Rights Reserved.
PREREQ session
Oracle Root Directory : /u01/sw
Central Inventory : /u01/oraInventory
de : /u01/sw/oraInst.loc
OPatch Version : 12.2.0.1.40
OUI Version : 12.2.0.7.0
Location of log file : /u01/sw/cfgtoollogs/opatch/opatch/opatch2023-11-15_18-17-30PM_1.log
Invoking prereq "checkconflicttagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.

In RAC environments, the patch will be installed in rolling mode (no downtime). If we are not in RAC environments, as in our example, it is necessary to perform a shutdown of all the databases belonging to the ORACLE_HOME to be patched, as well as the listener associated to these databases before being able to apply the patch.

[oracle@localhost 35320081]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0.0 - Production on Wed Nov 15 23:39:23 2023
Version 19.3.0.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0.0 - Production
Version 19.3.0.0.0.0
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

[oracle@localhost 35320081]$ lsnrctl stop
LSNRCTL for Linux: Version 19.0.0.0.0.0 - Production on 15-NOV-2023 23:40:10
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully

At this point it is possible to apply the patch.
The easiest way is to go to the directory where the unzipped patch is located and run the OPatch utility as follows:

unzip -d <PATCH_TOP_DIR> p35320081_<version>_<platform>.zip
cd <PATCH_TOP_DIR> 35320081
opatch apply

Here we show the output:

[oracle@localhost 35320081]$ opatch apply
Oracle Temporary Patch Installer version 12.2.0.1.40
Copyright (c) 2023, Oracle Corporation. All Rights Reserved.
Oracle Root Directory : /u01/sw
Central Inventory : /u01/oraInventory
from : /u01/sw/oraInst.loc
OPatch Version : 12.2.0.1.40
OUI Version : 12.2.0.7.0
Location of log file : /u01/sw/cfgtoollogs/opatch/opatch/opatch2023-11-15_23-48-57PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 35320081
Do you wish to continue? [y|n]
y
User Responded with: Y
All checks passed.
Close any Oracle instances running outside this ORACLE_HOME on the local system.
(Oracle Root Directory = '/u01/sw')
Is the local system ready to be patched? [y|n]
and
User Responded with: Y
Backing up files...

Applying patch to oracle.xdk.rsf component, 19.0.0.0.0.0...
Applying patch to oracle.ldap.client component, 19.0.0.0.0.0...
Applying patch to oracle.mgw.common component, 19.0.0.0.0.0...
Applying patch to oracle.odbc component, 19.0.0.0.0.0...
.
.
Patch 35320081 successfully applied.

We check that the database patch has been correctly applied.

[oracle@localhost 35320081]$ opatch lspatches
35320081;Database Release Update : 19.20.0.0.230718 (35320081)

At this point, we can open the database and raise the listener associated with the patched ORACLE_HOME.

Scroll to top