oracledba.help
Install

Applying Oracle 19c RU and OJVM Patches

TOC

Overview

The following covers applying Release Update (RU) and Oracle Java Virtual Machine (OJVM) patches to a standard database. The Patch July 2026 (19.32) is used in these examples.

Patch Fun Facts!

opatch

  • opatch updates the Oracle binaries.
  • You must shutdown all databases and listener before running opatch.

datapatch

  • datapatch loads modified SQL files into the database.
  • datapatch must be run for each separate database being patched.
    Set the ORACLE_SID for each before running.

Data Guard (DG) Environment

  • Patch DG systems first.
  • Patch binaries (opatch) on both primary and standby.
  • For SQL Patching (datapatch), only run on the primary.

Misc

  • Perform above logged in as the oracle user.
  • Combo Patch includes both Database RU and the OJVM RU.
  • RU = Release Update.
  • An RU changes the minor version.
    For example: 19.nn to 19.32.

Prerequisites

  • If using VMware or VirtualBox, take a snapshot before beginning.
  • Ensure you have the latest OPatch.
  • Confirm the Oracle inventory is OK.
    Example: $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
  • Download Oracle patches:
    1. Clear cache and cookies (required to fix Oracle DL bug).
    2. Go to support.oracle.com.
    3. Select "Patches" at top.
    4. Patch Search (x) Patch Name or Number: (ex: 39472050)
      Platform: Linux x86-64
      [Apply]
    5. Select required Patch number: 39472050 DATABASE RELEASE UPDATE 19.32.0.0.0 (Patch)
      Follow prompts to DL.
    6. Have AI go out and find\identify OJVM RU Patch number.
      In this case it finds: OJVM RU 19.32 = 39222882
    7. Search and DL the OJVM for 39222882 given the process used for the DATABASE RELEASE UPDATE above.

Example

 su - oracle
 DL to /u04/.../patches/2026-Jul
 mkdir /u04/.../patches/2026-Jul
 cp p39472050_190000_Linux-x86-64.zip /u01/orasw/patches/
 cp p39222882_190000_Linux-x86-64.zip /u01/orasw/patches/
 cd /u01/orasw/patches
 unzip p39472050_190000_Linux-x86-64.zip
 unzip p39222882_190000_Linux-x86-64.zip

One of the biggest reasons patches fail is lack of disk space in your ORACLE_HOME. Ensure you have 25gb or more free.

Database RU

Database RU: opatch

 su - oracle

 -- If Data Guard Environment, Stop Managed Recovery
 dgmgrl sys/*********@standby_db
 DGMGRL> edit database 'standby_db' set state='apply-off';
 Replace standby_db with your SB name (SELECT DB_UNIQUE_NAME FROM V$DATABASE;).

 -- Sanity Check: Correct DB (Primary vs. Standby)?
 SQLPlus> SELECT DB_UNIQUE_NAME FROM V$DATABASE;

 -- Stop Database(s) and Listener
 oracle> export ORACLE_SID=MyOraSid
 oracle> sqlplus / as sysdba
 SQLPLUS> shutdown immediate
 SQLPLUS> exit

 oracle> lsnrctl stop

 -- Prep Env (keep this window open to do OJVM as env already set)
 export PATH=$PATH:/usr/ccs/bin
 export PATH=$PATH:$ORACLE_HOME/OPatch
 cd $ORACLE_HOME/OPatch

 If Linux 8 run: export CV_ASSUME_DISTID=OEL8.1

 All cmds on one line (includes OEL8.1):
 export CV_ASSUME_DISTID=OEL8.1;export PATH=$PATH:/usr/ccs/bin;export PATH=$PATH:$ORACLE_HOME/OPatch;cd $ORACLE_HOME/OPatch

 -- Execute opatch
 ./opatch apply /u01/orasw/patches/39472050
 Verifying environment and performing prerequisite checks...

    Do you want to proceed? [y|n]: y
    Is the local system ready for patching? [y|n]: y
    Process runs...

    Upon completion the status will be displayed on screen.
    Example: OPatch succeeded.

 -- Start Database(s) and Listener
 oracle> lsnrctl start

 oracle> export ORACLE_SID=MyOraSid
 oracle> sqlplus / as sysdba
 SQLPLUS> startup
          IF Data Guard Database 🠊 startup mount
 SQLPLUS> exit

Database RU: datapatch

 -- If not a Standby DB, run datapatch. 
 cd $ORACLE_HOME/OPatch
 ./datapatch -verbose
 Connecting to database...OK
 Gathering database info...done
 Bootstrapping registry and package to current versions...done
 Determining current state...done
 ...
 Installing patches...
 Upon completion the status will be displayed on screen.
 Example: OPatch succeeded.

 -- Check dba_registry
 COL version     FORMAT a10
 COL action      FORMAT a10
 COL status      FORMAT a10
 COL action_time FORMAT a30
 COL description FORMAT a65
 SELECT patch_id,patch_type,action,status,action_time,description FROM dba_registry_sqlpatch;

   PATCH_ID PATCH_TYPE ACTION	 STATUS       ACTION_TIME                    DESCRIPTION 
  --------- ---------- ---------- ---------- ------------------------------ ---------------------------------------------------- 
   39472050 RU         APPLY	SUCCESS    05-Aug-26 17.06.nn.nnnnnn PM  Database Release Update : 19.32.0.0.nnn (nnn) 

 -- Update Permissions
 DBRU relinks libraries & executables and can change permissions.
 Execute the following as root user:

 export ORACLE_HOME=/u01/app/oracle/product/19.3.0.0.0/dbhome_1
 chown root $ORACLE_HOME/bin/extjob
 chmod 4750 $ORACLE_HOME/bin/extjob

The chown 4 (setuid) allows file to run with the priv of owner, rather than privs of user running executable.

OJVM RU

OJVM RU: opatch

 -- Shutdown DB and Listener
 sqlplus / as sysdba
 shutdown immediate
 exit

 lsnrctl stop

 -- Run: opatch apply 
 cd $ORACLE_HOME/OPatch
 ./opatch apply /u01/orasw/patches/39222882 -oh $ORACLE_HOME
 Verifying environment and performing prerequisite checks...

    Do you want to proceed? [y|n]: y
    Is the local system ready for patching? [y|n]: y
    Process runs...

    Upon completion the status will be displayed on screen.
    Example: OPatch succeeded.

 -- Startup DB and Listener
 sqlplus / as sysdba
 startup
 IF Data Guard Database 🠊 startup mount
 exit

 lsnrctl start

OJVM RU: datapatch

 -- If not a Standby DB, run: datapatch
 cd $ORACLE_HOME/OPatch
 ./datapatch -verbose
 Connecting to database...OK
 Gathering database info...done
 Bootstrapping registry and package to current versions...done
 Determining current state...done
 ...
 Installing patches...
 Upon completion the status will be displayed on screen.
 Example: OPatch succeeded.

Post Combo Patch Actions

Ensure Oracle Inventory for the oracle home shows applied patches.
OS> $ORACLE_HOME/OPatch/opatch lsinventory|more
39222882 (OJVM RU)
39472050 (DB RU)

Perform database status checks.

 SELECT instance_name,status,database_status,active_state FROM v$instance;

    INSTANCE_NAME    STATUS       DATABASE_STATUS   ACTIVE_ST 
    ---------------- ------------ ----------------- --------- 
    mydb1            OPEN         ACTIVE            NORMAL    

Check dba_registry

 COL version     FORMAT a10
 COL action      FORMAT a10
 COL status      FORMAT a10
 COL action_time FORMAT a30
 COL description FORMAT a65
 SELECT patch_id,patch_type,action,status,action_time,description FROM dba_registry_sqlpatch;

   PATCH_ID PATCH_TYPE ACTION     STATUS     ACTION_TIME                    DESCRIPTION 
  --------- ---------- ---------- ---------- ------------------------------ ---------------------------------------------------- 
  39472050  RU        APPLY      SUCCESS    05-Aug-26 HH.MM.nn.nnnnnn PM     Database Release Update : 19.32.0.0.nnn (39472050) 
  nnnnnnnn   INTERIM   ROLLBACK   SUCCESS    05-Aug-26 17.06.nn.nnnnnn PM    OJVM RELEASE UPDATE: 19.x.0.0.190716 (nnn) 
  39222882  INTERIM   APPLY      SUCCESS    05-Aug-26 17.06.nn.nnnnnn PM   OJVM RELEASE UPDATE: 19.32.0.0.nnn (39222882) 

List Patches

 opatch lspatches
 39222882;OJVM RELEASE UPDATE: 19.32.0.0.nnnnnn (39222882)
 39472050;Database Release Update : 19.32.0.0.nnnnnn (39472050)
 nnn;OCW RELEASE UPDATE 19.3.0.0.0 (nnn)

If data guard Environment: Restart Managed Recovery

 dgmgrl sys/*********@standby_db
 DGMGRL> edit database 'standby_db' set state='apply-on';
 Replace standby_db with your SB name (SELECT DB_UNIQUE_NAME FROM V$DATABASE;).

 -- On Both: Should show both on same software version.
 SELECT host_name, version_full FROM v$instance;

 -- On Standby: MRP0 should show APPLYING_LOG or IDLE
 SELECT PROCESS, STATUS, THREAD#, SEQUENCE# FROM V$MANAGED_STANDBY;

OJVM Status Check

Rollback Patch

Patch Deinstallation Instructions for a Non-RAC, Non-CDB Environment.

Rollback Fun Facts

  • Do the OJVM then Database Update.
  • opatch rollback also automactically rolls back the SQL changes (AKA datapatch).

Procedure

 0. Note current patch versions.
    $ORACLE_HOME/OPatch/opatch lspatches 

 0. Prep Env
    export CV_ASSUME_DISTID=OEL8.1;export PATH=$PATH:/usr/ccs/bin;export PATH=$PATH:$ORACLE_HOME/OPatch;cd $ORACLE_HOME/OPatch

 1. Shut down all instances and listeners associated with the Oracle home. 

     If Linux 8 run: export CV_ASSUME_DISTID=OEL8.1

     -- Stop Database(s) and Listener
     oracle> export ORACLE_SID=MyOraSid
     oracle> sqlplus / as sysdba
     SQLPLUS> shutdown immediate
     SQLPLUS> exit

     oracle> lsnrctl stop

 2. Run the OPatch utility specifying the rollback argument as follows:
    opatch rollback -id 39222882 (OJVM)
    opatch rollback -id 39472050 (Database Update)

 3. QC
    $ORACLE_HOME/OPatch/opatch lspatches

 4. After the rollback is complete, you will need to restart the 
    database for the changes to take effect.

    -- Start Database(s) and Listener
    oracle> lsnrctl start

    oracle> export ORACLE_SID=MyOraSid
    oracle> sqlplus / as sysdba
    SQLPLUS> startup
    SQLPLUS> exit

References

This page has been derived from various MOS resources including: Doc ID 2285040.1, 3-20637596581, 3-16179254071, 3-16515328131, 3-17593686831, 3-18616506451.