oracledba.help
Dev

Combo OJVM-DB_PSU Patch Set Updates (PSU)

<- Dev

TOC

Overview

The following covers applying a OJVM-DB_PSU combo patch. Combo patches contain the OJVM PSU in the same zip file as DB PSU for ease of downloading.

According to Oracle (3-18670875181), a database created with the Java VM Component should have the DB PSU and OJVM PSU patches installed. In today's enterprise production environments most all databases have the OJVM installed.

Always read the patch notes. These are just a cheat sheet for Patch 30133412 (AKA October 2019).

Prerequisites

  • Make sure your ORACLE_SID is set for the database being patched.
  • Download and install the latest OPatch.
  • Validate Oracle home.
    $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
  • Download the latest PSU:
    1. Go to MOS DB Proactive Patching Doc ID: 756671.1
    2. From 756671.1, search on: Database 12.1.0.2
    3. Select latest PSU entry: Combo OJVM PSU 12.1.0.2.nnn and Database PSU 12.1.0.2.nnn
    4. Select Patch that matches your OS: Linux x86-64
    5. Select Download then corresponding patch: pnnn_121020_Linux-x86-64.zip
  • As oracle user copy patch .zip file to your patches dir on each node.
    Example: cp /media/sf_sw/Oracle/patches/Combo_OJVM-DB_PSU/p30133412_121020_Linux-x86-64.zip /u01/orasw/patches/
  • Run My Oracle Support's Conflict Checker tool to detect and resolve any conflicts.
    If you have never used this go here.
  • Unzip the file.
su - oracle
cd /u01/orasw/patches
unzip p30133412_121020_Linux-x86-64.zip
A sub directory with the matching patch number will be created.

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

List Sub Patches

  • You want to identify which is the DB PSU and which is the OJVM PSU.
  • There is a README.html in each top-level sub dir that identifies type (DB or OJVM).

Change to the top most patch dir and review README.html in each top-level sub dir.

 cd /u01/orasw/patches/30133412
 ls -l
 29918340 PSU
 30128197 OJVM PSU
 ...

DB PSU

 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
 export PATH=$PATH:/usr/ccs/bin
 export PATH=$PATH:$ORACLE_HOME/OPatch
 cd $ORACLE_HOME/OPatch
 ./opatch apply /u01/orasw/patches/30133412/29918340

    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.

 -- 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
 cd $ORACLE_HOME/OPatch
 ./datapatch -verbose

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

 -- 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,version,action,status,action_time,description FROM dba_registry_sqlpatch;

  PATCH_ID    VERSION     ACTION  STATUS   ACTION_TIME                    DESCRIPTION 
  ----------  ----------  ------  -------  -----------------------------  --------------------------------------------------------------- 
  29918340    12.1.0.2    APPLY   SUCCESS  05-NOV-18 01.35.46.246596 PM   DATABASE PATCH SET UPDATE 12.1.0.2.nnnnnn 

Run the datapatch for each separate database running on the same shared Oracle home being patched. Set the ORACLE_SID for each.

OJVM PSU

 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/30133412/30128197 -oh $ORACLE_HOME

 -- 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:
 oracle> export ORACLE_SID=NxtOraSid
 Repeat above datapatch cmd for each DB.

Run the datapatch for each separate database running on the same shared Oracle home being patched. Set the ORACLE_SID for each.

Post Patch Actions

  • If any patches where identified during Patch Conflict Detection and Resolution step apply them now.
  • Ensure Oracle Inventory for the oracle home shows applied patches.
    OS> $ORACLE_HOME/OPatch/opatch lsinventory|more
  • 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,version,action,status,action_time,description FROM dba_registry_sqlpatch;

  PATCH_ID    VERSION     ACTION  STATUS   ACTION_TIME                    DESCRIPTION 
  ----------  ----------  ------  -------  -----------------------------  --------------------------------------------------------------- 
  29918340    12.1.0.2    APPLY   SUCCESS  05-NOV-18 01.35.46.246596 PM   DATABASE PATCH SET UPDATE 12.1.0.2.nnnnnn 
  30128197    12.1.0.2    APPLY   SUCCESS  05-NOV-18 02.05.50.362625 PM   Database PSU 12.1.0.2.nnnnnn, Oracle JavaVM Component(MONYYYY) 

APPENDIX

Common Errors

opatch apply Error

OPatch found the word "error" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
chmod: changing permissions of ‘/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/extjobO’: 
       Operation not permitted
make: [iextjob] Error 1 (ignored)


Composite patch 28259833 successfully applied.
OPatch Session completed with warnings.
Log file location: 
/u01/app/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatch/opatch2018-11-08_07-59-26AM_1.log

OPatch completed with warnings.

Solution

  1. Rollback patch.
  2. Reapply patch.

Example

 ./opatch rollback -id 29918340
 ./opatch apply /u01/orasw/patches/30133412/29918340