oracledba.help
Install

OJVM-GI-DB Patch Set Updates (PSU)

<- Install

TOC

Overview

The following covers applying a OJVM-GI-DB PSU combo patch. Combo patches contain the OJVM PSU in the same zip file as GI PSU and DB PSU for ease of downloading. The OJVM unzips to a separate subdirectory with its own install steps required.

Always read the patch notes. These are just a cheat sheet for an environment where:

  • The GI home is not shared.
  • The database home is not shared.
  • ACFS is not used.

Patch 28317214 is used in these examples (AKA July Patch 2018).

Combo Patch Fun Facts!

GI PSU

  • Run GI\DB PSU first then OJVM PSU.
  • opatchauto brings down the services, applys the patch and restarts the services on the node.
  • opatchauto only patches the individual node.
    So you have to run it on all nodes.
  • opatchauto will patch both the GRID_HOME and ORACLE_HOME on the node.
    So you don't have to explicitly execute it on the GI home then the DB home.
  • For GI\DB PSU's, opatchauto updates the SQL in the database.
    So you do not need to run datapatch -verbose afterward.
  • The GI\DB PSU opatchauto must be run from the GI Home as the root user.
  • The OJVM PSU is only applied to the database home via oracle user.
  • OJVM PSU must be applied as a Nonrolling Patch.
  • The above is derived from various MOS cases including: 3-16179254071, 3-16515328131, 3-17593686831, 3-18616506451.

Prerequisites

  • Download and install the latest OPatch.
  • Validate Oracle home for both the oracle and grid users.
    $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: 4.3 Database 12.1.0.2
    3. Select latest PSU entry: Combo Of OJVM Component 12.1.0.2.nnn DB PSU + GI PSU12.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 grid user copy patch .zip file to your patches dir on each node.
    Example: cp /media/sf_sw/Oracle/patches/Combo_OJVM-GI-DB_PSU/p28317214_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 - grid
cd /u01/orasw/patches
unzip p<PatchFileName>.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 home directories (oracle and grid). Ensure you have 25gb or more free.

List Sub Patches

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

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

 cd /u01/orasw/patches/28317214
 ls -l
 27967747 PSU
 27923320 OJVM
 ...

GI PSU

Perform on each sub patch on each node as indicated by patch notes Configuration and PSU Mapping section.

 su -
 export PATH=$PATH:/u01/app/12.1.0.2/grid/OPatch
 cd /u01/app/12.1.0.2/grid/OPatch
 ./opatchauto apply /u01/orasw/patches/28317214/27967747

Log File Paths:

  • PSU: /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto<DateTime>.log
  • PSU: /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch<DateTime>.log

OJVM PSU

After the GI PSU has been completed for all nodes, open new console window to apply the OJVM PSU.

 su -
 export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1
 export PATH=$ORACLE_HOME/bin:$PATH
 export PATH=$PATH:$ORACLE_HOME/OPatch
 cd $ORACLE_HOME/OPatch
 ./opatchauto apply /u01/orasw/patches/28317214/27923320 -oh $ORACLE_HOME -nonrolling
  • OJVM Log Path: $ORACLE_HOME/cfgtoollogs/opatchautodb/opatch<DateTime>.log
  • For Oracle-Restart run the the OJVM without the -nonrolling option.

Load Modified SQL Files Into the Database

Perform this on just node 1.

 SQL> shut immediate;
 SQL> startup upgrade;
 datapatch -verbose
 SQL> shut immediate;
 SQL> startup; 

Post Patch Actions

  • If any patches where identified during Patch Conflict Detection and Resolution step apply them now.
  • Ensure Oracle Inventory for grid and oracle homes shows applied patches.
    Show All Patches: $ORACLE_HOME/OPatch/opatch lsinventory|more
    Show One: $ORACLE_HOME/OPatch/opatch lsinventory|grep <PatchNumber>
  • Perform Status Checks.

APPENDIX

Locking and Unlocking Example

Lock

As root:

 export GRID_HOME=/u01/app/12.1.0.2/grid
 export PATH=$GRID_HOME/bin:$PATH
 cd /u01/app/12.2.0.1/grid/crs/install
 ./rootcrs.sh -unlock

 <<Apply Patches>>

Unlock

As root console used to lock:

 cd /u01/app/12.1.0.2/grid/crs/install
 ./rootcrs.sh -postpatch

Nonrolling Patch Example

Oracle JavaVM Component <vers> Database PSU used for this example.

 su -
 export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1
 export PATH=$ORACLE_HOME/bin:$PATH
 export PATH=$PATH:$ORACLE_HOME/OPatch
 cd $ORACLE_HOME/OPatch
 ./opatchauto apply /u01/orasw/patches/27726478/27475603 -oh $ORACLE_HOME -nonrolling

Disable Node from Restarting

su -
export GRID_HOME=/u01/app/12.1.0.2/grid
export PATH=$GRID_HOME/bin:$PATH
cd $GRID_HOME/bin

crsctl stop crs
crsctl disable crs

Rollback Example

As root: from OPatch dir:

  • ./opatchauto rollback /u01/orasw/patches/27726478/27468957 -oh /u01/app/grid/product/12.1.0.2/grid
  • $ORACLE_HOME/OPatch/opatch lsinventory

Successful Patch Output Example

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:lnx01
RAC Home:/u01/app/oracle/product/12.1.0.2/dbhome_1
Version:12.1.0.2.0
Summary:

==Following patches were SKIPPED:

Patch: /u01/orasw/patches/27726478/27468957/26983807
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /u01/orasw/patches/27726478/27468957/27338013
Reason: This patch is not applicable to this specified target type - "rac_database"

==Following patches were SUCCESSFULLY applied:

Patch: /u01/orasw/patches/27726478/27468957/27338020
Log: /u01/app/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-06-20_08-48-33AM_1.log

Patch: /u01/orasw/patches/27726478/27468957/27338041
Log: /u01/app/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-06-20_08-48-33AM_1.log

Host:lnx01
CRS Home:/u01/app/12.1.0.2/grid
Version:12.1.0.2.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u01/orasw/patches/27726478/27468957/26983807
Log: /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-06-20_08-51-00AM_1.log

Patch: /u01/orasw/patches/27726478/27468957/27338013
Log: /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-06-20_08-51-00AM_1.log

Patch: /u01/orasw/patches/27726478/27468957/27338020
Log: /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-06-20_08-51-00AM_1.log

Patch: /u01/orasw/patches/27726478/27468957/27338041
Log: /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-06-20_08-51-00AM_1.log

OPatchauto session completed at Wed Jun 20 09:07:33 2018
Time taken to complete the session 24 minutes, 4 seconds

Oracle-Restart GI Session

 -- Apply Standard PSU (Oracle-Restart)
 su -
 export PATH=$PATH:/u01/app/grid/product/12.1.0.2/grid/OPatch
 cd /u01/app/grid/product/12.1.0.2/grid/OPatch
 ./opatchauto apply /u01/orasw/patches/27726478/27468957

Is is bascially the same as for RAC just using the Oracle Restart ORACLE_HOME of the grid user correspondingly.

Rollback Example Session

 -- Get Sub Patches
 cd /u01/orasw/patches/28317214
 ls -l
 27923320 OJVM
 27967747 PSU

 -- Rollback: OJVM
 export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1
 export PATH=$ORACLE_HOME/bin:$PATH
 export PATH=$PATH:$ORACLE_HOME/OPatch
 cd $ORACLE_HOME/OPatch
 ./opatchauto rollback /u01/orasw/patches/28317214/27923320 -oh $ORACLE_HOME -nonrolling

 -- Rollback: PSU
 export ORACLE_HOME=/u01/app/12.1.0.2/grid
 export PATH=$ORACLE_HOME/bin:$PATH
 export PATH=$PATH:$ORACLE_HOME/OPatch
 cd $ORACLE_HOME/OPatch
 ./opatchauto rollback /u01/orasw/patches/28317214/27967747 -oh $ORACLE_HOME [-nonrolling]

 -- QC
 $ORACLE_HOME/OPatch/opatch lsinventory

Rollback Example Session: Sub-Patches

 -- Determine Sub Patches to Rollback
 su - oracle
 $ORACLE_HOME/OPatch/opatch lsinventory

 Interim patches (2) :

 Patch  27762253     : applied on Wed Sep 05 14:40:03 EDT 2018
 Unique Patch ID:  22108407
 Patch description:  "OCW PATCH SET UPDATE 12.1.0.2.180717 (27762253)"
 ...
 Patch  27547329     : applied on Wed Sep 05 14:38:48 EDT 2018
 Unique Patch ID:  22280349
 Patch description:  "Database Patch Set Update : 12.1.0.2.180717 (27547329)"

 -- Determine Path To Subpatch Directoies
 cd /u01/orasw/patches/28317214
 ls -l 
   drwxr-xr-x 4 grid oinstall    67 May 29 14:24 27923320
   drwxr-xr-x 7 grid oinstall   143 Jul 16 07:10 27967747
 cd 27967747
 ls -l
  drwxr-xr-x  4 grid oinstall     48 Jul 16 07:03 26983807
  drwxr-xr-x 18 grid oinstall   4096 Jul 16 07:07 27547329
  drwxr-xr-x  5 grid oinstall     62 Jul 16 07:08 27762253
  drwxr-xr-x  5 grid oinstall     62 Jul 16 07:06 27762277

 cd 27762253
 pwd
  /u01/orasw/patches/28317214/27967747/27762253  <-Use THIS for patch path for 27762253 etc..

 -- With DB Home set (in this case):
 Ensure other nodes up then:
 ./opatchauto rollback /u01/orasw/patches/28317214/27967747/27762253 -oh $ORACLE_HOME -nonrolling
 ./opatchauto rollback /u01/orasw/patches/28317214/27967747/27547329 -oh $ORACLE_HOME -nonrolling