Install and Patch in one single action with OUI

This is such a common case: You want to install a new Oracle Home and you’d like to apply the most recent patch bundle to it as well. But as we don’t officially offer Gold Images to download where the RU is included already, you have to do three tasks instead of one. But you can avoid this and Install and Patch in one single action with OUI.

Recommendation and 3 standard actions

We always recommend that you apply the most recent RU. Hence, usually you will download Oracle Database 19.3.0 from eDelivery or from at first. Afterwards you will download for instance Oracle 19.8.0 and apply it on top. And very often you will need to download and install a more recent version of OPatch beforehand.

Install everything in 1 action

Since Oracle Database 18c an often overlooked feature exists. With OUI, you can not only install Oracle 18.3.0 or Oracle 19.3.0 but you can also apply the patch bundle in addition with just one single call. And you can even add one-off patches on top. But make sure they are not conflicting.

Of course, you still need to download the software at first. In my case, I will download 19.3.0, the July 2020 RU 19.8.0 and the most recent version of opatch. In addition, I add one-off patch 29041775 to it. This cures a misbehavior of Multitenant when you mix character sets and add a PDB with character set WE8MSWIN1252. A customer I work with right now ran into this issue when migrating to ExaCS.

This is the approach.

  1. Create the future Oracle Home directory:
  2. Download and unzip the software release into the Oracle Home directory:
  3. Create /patch subdirectory for:
  4. Download and unzip the patch(es) into the patch subdirectory:
  5. all the installer and let it do its work:

You can use this approach also for multiple patches – just separate them with commas, e.g.:

./runInstaller -applyRU [patch-id] -applyOneOffs [patch-id1],[patch-id2],...



When I demonstrated this technique in our Web Seminar 1: Database Release and Patching Strategy on June 23, 2020, somebody asked whether opatch needs to be updated as well. And that is a very valid question.

In fact, I agree – you should update opatch before you invoke the installer. As opatch is not an ordinary patch, you can’t install it via the runInstaller process. You need to copy it upfront into your home.

  1. Check the readme of the RU you’d like to apply
  2. Check the local current version of opatch in your unzipped new $ORACLE_HOME
    $ export ORACLE_HOME=/u01/app/oracle/product/1980
    [DB12] oracle@hol:/u01/app/oracle/product/1980/OPatch
    $ ./opatch version
    OPatch Version:
    OPatch succeeded.
  3. If necessary, download the most recent opatch via patch 6880880.
  4. Remove the existing new $ORACLE_HOME/OPatch directory
  5. Copy the opatch zip into the new $ORACLE_HOME directory
  6. Unzip the opatch zip


Here I will apply 19.8.0

I unpack the following two patches (RU 19.8.0 and one-off 29041775) into a subdirectory $ORACLE_HOME/patch.

Please be aware that you need to keep them separate directories as otherwise the XML files overwrite each other – that’s why it is one level deeper:

[DB12] oracle@hol:/u01/app/oracle/product/1980/patch
$ ls
29041775  31281355

Then I can call the OUI with – and VERY IMPORTANT again, you need to specify the subdirectories where the patches are located at. If you don’t do this, it will fail as I explain at the end of this blog post:

$ ./runInstaller -applyRU patch/31281355/31281355 -applyOneOffs patch/29041775/29041775
Preparing the home to patch...
Applying the patch patch/31281355/31281355...
Successfully applied the patch.
Applying the patch patch/29041775/29041775...
Successfully applied the patch.
The log can be found at: /u01/app/oraInventory/logs/InstallActions2020-07-27_05-57-23PM/installerPatchActions_2020-07-27_05-57-23PM.log
Launching Oracle Database Setup Wizard...

Afterwards, the OUI GUI starts up:

I’m just showing a few example screens here:

And finally, a few clicks later, everything is done.

Let me check what opatch has to say:

$ export ORACLE_HOME=/u01/app/oracle/product/1980
[DB12] oracle@hol:/u01/app/oracle/product/1980
$ OPatch/opatch lsinventory
Oracle Interim Patch Installer version
Copyright (c) 2020, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/1980
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/1980/oraInst.loc
OPatch version    :
OUI version       :
Log file location : /u01/app/oracle/product/1980/cfgtoollogs/opatch/opatch2020-07-27_17-44-14PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/1980/cfgtoollogs/opatch/lsinv/lsinventory2020-07-27_17-44-14PM.txt
Local Machine Information::
Hostname: hol
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1): 

Oracle Database 19c                                        
There are 1 products installed in this Oracle Home.

Interim patches (3) :

Patch  29041775     : applied on Tue Jul 28 21:30:58 CEST 2020
Unique Patch ID:  23690111
Patch description:  "ORA-41401 IN ALERT.LOG EXACM"
   Created on 11 Jul 2020, 01:19:40 hrs PST8PDT
   Bugs fixed:
   This patch overlays patches:
     31281355, 29517242, 31281355
   This patch needs patches:
     31281355, 29517242, 31281355
   as prerequisites

Patch  31281355     : applied on Tue Jul 28 21:27:57 CEST 2020
Unique Patch ID:  23688465
Patch description:  "Database Release Update : (31281355)"
   Created on 6 Jul 2020, 11:18:02 hrs PST8PDT
   Bugs fixed:
     30533132, 30312546, 29924181, 30980733, 31383396, 31094688, 7391838
     8476681, 14735102, 17428816, 19080742, 19697993, 20313356, 21374587
     31134430, 31153120, 31156383, 31172207, 31177193, 31182793, 31193936
     31200845, 31305624, 31338673, 31393600, 31414023, 31414524

Patch  29585399     : applied on Thu Apr 18 09:21:33 CEST 2019
Unique Patch ID:  22840393
Patch description:  "OCW RELEASE UPDATE (29585399)"
   Created on 9 Apr 2019, 19:12:47 hrs PST8PDT
   Bugs fixed:
     27222128, 27572040, 27604329, 27760043, 27877830, 28302580, 28470673


OPatch succeeded.

The message regarding the one-off is not really clear:

Patch  29041775     : applied on Tue Jul 28 21:30:58 CEST 2020
Unique Patch ID:  23690111
Patch description:  "ORA-41401 IN ALERT.LOG EXACM"
   Created on 11 Jul 2020, 01:19:40 hrs PST8PDT
   Bugs fixed:
   This patch overlays patches:
     31281355, 29517242, 31281355
   This patch needs patches:
     31281355, 29517242, 31281355
   as prerequisites

I checked:

  • 31281355 is the July 2020 RU (19.8.0) – the patch bundle I install within the same process
  • 29517242 is the April 2019 RU (19.3.0) – the base release I settle on

Even though this message seems to be a bit strange to me, all went fine.

Mission accomplished.

But what if you use Grid Infrastructure?

Grid Infrastructure

The same approach works with Grid Infrastructure as well.

mkdir /u01/app/grid/1970
cd /u01/app/grid/1970
./gridSetup -applyRU 30899722

And I had to laugh out loud on Friday when I started writing this blog post. In my twitter timeline, Anil Nair, RAC PM at Oracle, included me into a tweet – about the exact same topic. But of course, Anil covers GI – and he has added a very helpful troubleshooting section as well. So please, if you’d like to read the details about RAC/GI for this topic, check Anil’s post:


You can watch the database software installation and patching in this video:

The not-so-nice part

Well, if something goes wrong, you will start from scratch again.

You can see below what happens when my patch application failed:

$ ./runInstaller -applyRU patch/31281355 -applyOneOffs patch/29041775
Preparing the home to patch...
Applying the patch patch/31281355/...
OPatch command failed while applying the patch. For details look at the logs from /u01/app/oracle/product/1980/cfgtoollogs/opatchauto/.

Problem 1:
Ok, I confess – the problem is in front of the screen. The way how I specify the subdirectories is wrong. But this leads me to …

Problem 2:
There is a “opatchauto” subdirectory. But this is not the one to look into as it is empty. The correct one is called “opatchautodb” in my case.

Problem 3:
The logfile does not really tell me what the issue is.

2020-07-24 15:51:46,871 INFO  [1] - indexOfRemote: -1
2020-07-24 15:51:46,873 INFO  [1] - currentUser: oracle
2020-07-24 15:51:46,923 INFO  [1] - indexOfRemote: -1
2020-07-24 15:51:46,923 INFO  [1] - currentUser: oracle
2020-07-24 15:51:46,967 INFO  [1] - Processing common bootstrap parameters.
2020-07-24 15:51:46,967 INFO  [1] - Space available: 239111 MB
2020-07-24 15:51:46,985 INFO  [1] - Patch information is :  [Patch Location: patch/31281355/]
2020-07-24 15:51:46,985 INFO  [1] - Patch information is :  [Patch Location: patch/31281355/, Patch Base Directory: null, Patch Id: null]
2020-07-24 15:51:47,711 INFO  [1] - Patch Aru id:226
2020-07-24 15:51:47,713 INFO  [1] - Platform Aru id:226
2020-07-24 15:51:47,715 INFO  [1] - The patchInfo is :
2020-07-24 15:51:47,717 INFO  [1] - The bootstrap params are: BootstrapParams [baseLocation=/u01/app/oracle/product/1980, operationType=APPLY, homes=null, customLogDir=/u01/app/oracle/product/1980/cfgtoollogs, customConfigDir=/u01/app/oracle/product/1980/opatchautocfg/db, invPtrLocation=null, isRemotePatching=false, isOOPPatching=false,, credential=null, gridHome=null, gridVersion=null, isBinaryPatching=true, isShardSidbPatching=false, isStandaloneSidbPatching=false, pathWithFilesFromLoc=null]
2020-07-24 15:51:47,727 INFO  [1] - Creating boostrap dir: /u01/app/oracle/product/1980/opatchautocfg/db/dbtmp/bootstrap_hol
2020-07-24 15:51:47,727 INFO  [1] - Creating patchwork dir: /u01/app/oracle/product/1980/opatchautocfg/db/dbtmp/bootstrap_hol/patchwork
2020-07-24 15:51:47,784 INFO  [1] oracle.glcm.opatch.common.impl.PatchFactoryImpl - Registering:SYSTEM_PATCH:oracle.glcm.opatch.common.impl.SystemPatch
2020-07-24 15:51:47,785 INFO  [1] oracle.glcm.opatch.common.impl.PatchFactoryImpl - Registering:COMPOSITE_PATCH:oracle.glcm.opatch.common.impl.CompositePatch
2020-07-24 15:51:47,785 INFO  [1] oracle.glcm.opatch.common.impl.PatchFactoryImpl - Registering:SINGLETON_PATCH:oracle.glcm.opatch.common.impl.SingletonPatch
2020-07-24 15:51:47,792 INFO  [1] oracle.glcm.opatch.common.impl.PatchFactoryImpl - Singleton  patch not found
2020-07-24 15:51:47,795 INFO  [1] oracle.glcm.opatch.common.impl.PatchFactoryImpl - Composite patch NOT found
2020-07-24 15:51:47,796 INFO  [1] oracle.glcm.opatch.common.impl.PatchFactoryImpl - System patch NOT found
2020-07-24 15:51:47,796 SEVERE [1] - Exception while loading the patch for validating perl patching as the patch type is invalid: The patch type is invalid in patch location: /u01/app/oracle/product/1980/patch/31281355
2020-07-24 15:51:47,797 SEVERE [1] - OPATCHAUTO-72146: Failed to load patch
OPATCHAUTO-72146: Failed while collecting patch information for patch patch/31281355/.
OPATCHAUTO-72146: Check the log for more information.
2020-07-24 15:51:47,798 INFO  [1] - The bootstrap execution result is : [BootstrapResult [result=FAILED, pluginType=PERL, errorMessage=OPATCHAUTO-72146: Failed to load patch
OPATCHAUTO-72146: Failed while collecting patch information for patch patch/31281355/.
OPATCHAUTO-72146: Check the log for more information., errorCode=72145]]
2020-07-24 15:51:47,808 SEVERE [1] - OPATCHAUTO-72083: Performing bootstrap operations failed.
OPATCHAUTO-72083: The bootstrap execution failed because OPATCHAUTO-72146: Failed to load patch
OPATCHAUTO-72146: Failed while collecting patch information for patch patch/31281355/.
OPATCHAUTO-72146: Check the log for more information..
OPATCHAUTO-72083: Fix the reported problem and re-run opatchauto.

Well, it looks liks as if opatch couldn’t find the patch information But it is there (I thought so). I checked it. But it seems not to look for the XML file. To me, the above log information was neither clear nor obvious. And I didn’t find useful information in MOS searching for OPATCHAUTO-72146 and OPATCHAUTO-72083.

Problem 4:
If you’d like to alter something now, and run it again, well …

$ ./runInstaller -applyRU patch/31281355/ -applyOneOffs patch/29041775/

ERROR: The home is not clean. This home cannot be used since there was a failed OPatch execution in this home. Use a different home to proceed.

Ouch. Gladly I work in VBox and created a snapshot upfront. Back to start.

The Solution:
Very simple: $ ./runInstaller -applyRU patch/31281355/31281355 -applyOneOffs patch/29041775/29041775

MS Windows [added Nov 23, 2020]

Well, thanks to Joel Peran who tested this with 19.9.0 on MS Windows. I wasn’t aware but it seems to be that this nice little feature didn’t found its path into the Windows code. This screenshot is from Joel:

Install and Patch in one single action with OUI

Hence, unfortunately “applyRU” does not work on the MS Windows platform.


Kudos to the guys who developed it. This is really really REALLY a very convenient way to install and patch in one action – and as Anil showed, it works with GI as well. I like this approach a lot, it eases my tasks and I can automate things. With -applyRU you can add RUs (I didn’t try RURs but I ignore them anyways), with -applyOneOffs you can add one-off patches. Very convenient approach. Try it out please.

Further Information and Links


Share this: