oracledba.help
Install

19c Combo OJVM-DB-RU

TOC

Overview

The following covers applying the OJVM-DB Release Update (RU) combo patch to a standard database. Patch 36522340 is used in these examples (AKA July 2024).

Combo Patch Fun Facts!

For both the Database RU and the OJVM RU

  • You must shutdown all databases and listener before running opatch apply.
  • datapatch -verbose is run after opatch apply.
  • datapatch must be run for each separate database being patched.
    Set the ORACLE_SID for each before running.
  • The above must be run logged in as the oracle user.
  • An RU can change the minor version.
    For example: 19.nn to 19.24.

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 Combo patch (Doc ID 2118136.2):
    1. What would you like to download? OJVM Update/PSU/Bundle Patches
    2. Please select the version: 19.0.0.0
    3. Download: OJVM + DB Update (36522340) 🠊 Select OS (Linux x86-64)
    4. As oracle user copy patch .zip file to your patches dir.
  • Run My Oracle Support's Conflict Checker to detect and resolve any conflicts.
  • Unzip the downloaded combo patch zip file.

Example

 su - oracle
 mkdir /u05/patches/19/2024-Jul
 DL to /u05/patches/19/2024-Jul
 cd /u05/patches/19/2024-Jul
 cp p36522340_190000_Linux-x86-64.zip /u01/orasw/patches/
 cd /u01/orasw/patches
 unzip p36522340_190000_Linux-x86-64.zip
A sub directory with the matching patch number (36522340) will be created.
  • List included major patch sets.

cd /u01/orasw/patches/36522340
ls -l
36582781 (DB RU)
36414915 (OJVM RU)

• There is a README.html in each top-level sub dir that identifies type (DB or OJVM).
• <title>Oracle Database Patch 36582781 - Database Release Update 19.nnn</title>
• <title>Oracle Database Patch 36414915 - Oracle JavaVM Component Release Update 19.nnn</title>

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

 su - oracle

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

 If multiple DB's on system:
 oracle> export ORACLE_SID=NxtOraSid
 Repeat above shutdown steps for each DB.

 oracle> lsnrctl stop

 -- Execute opatch
 If Linux 8 run: export CV_ASSUME_DISTID=OEL8.1
 export PATH=$PATH:/usr/ccs/bin
 export PATH=$PATH:$ORACLE_HOME/OPatch
 cd $ORACLE_HOME/OPatch

 Prep 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

 ./opatch apply /u01/orasw/patches/36522340/36582781

    Verifying environment and performing prerequisite checks...[5-15 minutes]

    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.

 -- Conflict Patches
 If any Patch Conflict Detection and Resolution patches where identified apply them now.

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

 oracle> export ORACLE_SID=MyOraSid
 oracle> sqlplus / as sysdba
 SQLPLUS> startup
          startup mount <- For a Data Guard Standby
 SQLPLUS> exit

 If multiple DB's on system:
 oracle> export ORACLE_SID=NxtOraSid
 Repeat above startup steps for each DB.

 -- Run datapatch (Loads Modified SQL Files into the Database)
 cd $ORACLE_HOME/OPatch
 ./datapatch -verbose

 If multiple DB's on system run datapatch for each:
 oracle> export ORACLE_SID=NxtOraSid
 ./datapatch -verbose.

 -- 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 
  --------- ---------- ---------- ---------- ------------------------------ ---------------------------------------------------- 
   36582781 RU         APPLY	SUCCESS    21-Dec-24 09.23.nn.nnnnnn AM  Database Release Update : 19.24.0.0.nnn (36582781) 

 -- Update Permissions
 DBRU relinks libraries & executables and can change permissions.
 Execute the following as root user:
 # 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

 su - oracle

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

 lsnrctl stop

 -- Run: opatch apply 
 cd $ORACLE_HOME/OPatch
 ./opatch apply /u01/orasw/patches/36522340/36414915 -oh $ORACLE_HOME

    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
 exit

 lsnrctl start

 -- Run: datapatch
 cd $ORACLE_HOME/OPatch
 ./datapatch -verbose

 If multiple DB's on system run datapatch for each:
 oracle> export ORACLE_SID=NxtOraSid
 ./datapatch -verbose.

Post Combo Patch Actions

Ensure Oracle Inventory for the oracle home shows applied patches.
OS> $ORACLE_HOME/OPatch/opatch lsinventory|more
36582781 (DB RU)
36414915 (OJVM 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 
  --------- ---------- ---------- ---------- ------------------------------ ---------------------------------------------------- 
  36582781  RU        APPLY      SUCCESS    21-Dec-24 HH.MM.nn.nnnnnn AM     Database Release Update : 19.24.0.0.nnn (36582781) 
  nnnnnnnn   INTERIM   ROLLBACK   SUCCESS    21-Dec-24 09.23.nn.nnnnnn AM    OJVM RELEASE UPDATE: 19.x.0.0.190716 (nnn) 
  36414915  INTERIM   APPLY      SUCCESS    21-Dec-24 09.23.nn.nnnnnn AM   OJVM RELEASE UPDATE: 19.24.0.0.nnn (36414915) 

List Patches

 opatch lspatches
 36414915;OJVM RELEASE UPDATE: 19.24.0.0.nnnnnn (36414915)
 36582781;Database Release Update : 19.24.0.0.nnnnnn (36582781)
 nnn;OCW RELEASE UPDATE 19.3.0.0.0 (nnn)

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 

 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

     Env Prep cmds on one line:
     export PATH=$PATH:/usr/ccs/bin;export PATH=$PATH:$ORACLE_HOME/OPatch;cd $ORACLE_HOME/OPatch

 2. Run the OPatch utility specifying the rollback argument as follows:
    opatch rollback -id 36414915 (OJVM)
    opatch rollback -id 36582781 (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.