12.1 Combo OJVM-DB_PSU Patch Set Updates (PSU)
🠊 Attention
To be able to download the PSU for 12.1 now requires Oracle Extended Support.
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 33248571 (AKA October 2021).
Prerequisites
- If using VMware or VirtualBox, take a snapshot before beginning.
- Download and install the latest OPatch.
- Validate Oracle home.
$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME - Download the latest PSU:
- Go to MOS DB Proactive Patching Doc ID: 756671.1
- From 756671.1, search on: Database 12.1.0.2
- Select latest PSU entry: COMBO OF OJVM COMPONENT 12.1.0.2.nnn DB PSU + DBPSU 12.1.0.2.nnn
AKA: Combo OJVM PSU 12.1.0.2.nnn and Database PSU 12.1.0.2.nnn - Select Patch that matches your OS: Linux x86-64
- 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/12.1/2021-Oct/p33248571_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.
One of the biggest reasons patches fail is lack of disk space in your ORACLE_HOME directory. Ensure you have 25gb or more free.
If out of disk space, see: How To Avoid Disk Full Issues Because OPatch Backups Take Big Amount Of Disk Space. (Doc ID 550522.1).
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/33248571 ls -l 33128590 PSU 33192628 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/33248571/33128590 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 ---------- ---------- ------ ------- ----------------------------- --------------------------------------------------------------- 33128590 12.1.0.2 APPLY SUCCESS 21-Dec-24 11.50.nn.nnnnnn AM 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/33248571/33192628 -oh $ORACLE_HOME -- Startup DB and Listener sqlplus / as sysdba startup exit If multiple DB's start them all. oracle> export ORACLE_SID=NxtOraSid sqlplus / as sysdba startup exit lsnrctl start -- Run: datapatch cd $ORACLE_HOME/OPatch ./datapatch -verbose For DB with OJVM: oracle> export ORACLE_SID=NxtOraSid Repeat above datapatch cmd for each DB using OJVM.
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 ---------- ---------- ------ ------- ----------------------------- --------------------------------------------------------------- 33128590 12.1.0.2 APPLY SUCCESS 21-Dec-24 HH.MM.nn.nnnnnn AM DATABASE PATCH SET UPDATE 12.1.0.2.nnnnnn 33192628 12.1.0.2 APPLY SUCCESS 21-Dec-24 11.50.nn.nnnnnn AM 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
- Rollback patch.
- Reapply patch.
Example
./opatch rollback -id 33128590 ./opatch apply /u01/orasw/patches/33248571/33128590