The Easiest Way to Download the Latest OPatch

I just saw a post on LinkedIn about the OPatch page on My Oracle Support stating it was the worst experience ever!

I had a look and I agree there’s room for improvement (possibly an understatement). I’ll see if I can find someone to give it a polish.

In the meantime, let me show you a much better to download the latest OPatch. Using AutoUpgrade in download mode.

How to Download OPatch

I download from my Mac, but Windows or Linux would do fine as well.

  1. I download the latest version of AutoUpgrade:

    wget https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar
    
  2. I create an AutoUpgrade config file called get-patches:

    global.global_log_dir=/Users/daniel/orcl/autoupgrade/logs
    global.keystore=/Users/daniel/orcl/autoupgrade/keystore
    global.folder=/Users/daniel/Downloads/patches
    
    patch1.platform=LINUX.X64
    patch1.target_version=19
    patch1.patch=OPATCH
    
    • I use the platform parameter to instruct AutoUpgrade to find OPatch for Linux.
    • I want OPatch for an 19c database and I specify that with target_version.
    • I just want OPatch, so I set patch=OPATCH.
  3. I’ve already used AutoUpgrade to download patches, so my My Oracle Support credentials are already stored in the AutoUpgrade keystore. If you’ve never used AutoUpgrade to download patches, follow the instructions below (see Creating an AutoUpgrade Keystore).

  4. I download the patches by starting AutoUpgrade in download mode:

    java -jar autoupgrade.jar -config get-patches -patch -mode download
    
  5. AutoUpgrade finds and downloads the right version of OPatch:

    AutoUpgrade Patching 26.3.260401 launched with default internal options
    Processing config file ...
    Loading AutoUpgrade Patching keystore
    AutoUpgrade Patching keystore is loaded
    
    Connected to MOS - Searching for specified patches
    
    ------------------------------------------------------
    Downloading files to /Users/daniel/Downloads/patches
    ------------------------------------------------------
    OPatch 12.2.0.1.51 for DB 19.0.0.0.0 (Apr 2026)
       File: p6880880_190000_Linux-x86-64.zip - VALIDATED
    ------------------------------------------------------
    
  6. That’s it! Is it really that easy? Yes, it is…

Happy patching!

What About the Other Platforms and Releases?

  • You can download for more platforms by adding:
    patch2.platform=WINDOWS.X64
    patch2.target_version=19
    patch2.patch=OPATCH
    
    patch3.platform=AIX.x64
    patch3.target_version=19
    patch3.patch=OPATCH
    
  • You can download for more releases by adding:
    patch4.platform=LINUX.X64
    patch4.target_version=21
    patch4.patch=OPATCH
    
    patch5.platform=LINUX.X64
    patch5.target_version=26
    patch5.patch=OPATCH
    
    • AutoUpgrade supports downloading patches from Oracle Database 19c and onwards.

Creating an AutoUpgrade Keystore

The first time I use AutoUpgrade to download patches, I must store my MOS credentials in the AutoUpgrade keystore.

  1. I create my config file. It must include global.keystore to specify the location of the AutoUpgrade keystore.

  2. I start the password console:

    java -jar autoupgrade.jar -config get-patches -patch -load_password
    
  3. AutoUpgrade prompts for a password to protect its keystore. AutoUpgrade uses the password to encrypt the keystore, which stores my My Oracle Support credentials.

    • This is not the database keystore password that you use for TDE Tablespace Encryption.
    Processing config file ...
    
    Starting AutoUpgrade Patching Password Loader - Type help for available options
    Creating new AutoUpgrade Patching keystore - Password required
    Enter password:
    Enter password again:
    
  4. I specify my MOS username. AutoUpgrade then prompts me for the MOS password:

    MOS> add -user <mos-username-or-email>
    Enter your secret/Password:
    Re-enter your secret/Password:
    
  5. I save the changes, and I choose to create an auto-login keystore so I don’t have to enter the AutoUpgrade keystore password every time AutoUpgrade starts:

    MOS> save
    Convert the AutoUpgrade Patching keystore to auto-login [YES|NO] ? YES
    
  6. I exit, and that’s it:

    MOS> exit
    
    AutoUpgrade Patching Password Loader finished - Exiting AutoUpgrade Patching
    

Here’s a video explaining the use of the AutoUpgrade keystore:

Further Reading

AutoUpgrade New Features: Download Bundle Patches for Spatial and Text

If you use the Spatial Data Option or Oracle Text in your Oracle AI Database, you should add the dedicated bundle patches to your Oracle home.

In AutoUpgrade, you can use the keywords SDOBP (Spatial) and TEXT (Oracle Text) to download and add the patches to your Oracle home. Here’s an example:

global.global_log_dir=/home/oracle/autoupgrade-patching/log
global.keystore=/home/oracle/autoupgrade-patching/keystore
global.folder=/home/oracle/autoupgrade/patches

patch1.target_version=19
patch1.platform=LINUX.X64
patch1.patch=RECOMMENDED,SDOBP,TEXT

I start AutoUpgrade in download mode:

java -jar autoupgrade.jar -config download.cfg -mode download -patch

AutoUpgrade determines that 19.30 is the latest Release Update and finds the appropriate bundle patches:

Connected to MOS - Searching for specified patches

-----------------------------------------------------
Downloading files to /home/oracle/autoupgrade/patches
-----------------------------------------------------
DATABASE RELEASE UPDATE 19.30.0.0.0(REL-JAN260130)
    File: p38632161_190000_Linux-x86-64.zip - LOCATED

...

SPATIAL BUNDLE PATCH #1 ON DBRU 19.30.0.0.0
    File: p38794194_1930000DBRU_Linux-x86-64.zip - LOCATED

MERGE OF 19.30 ORACLE TEXT RAC + NON-RAC MLRS
    File: p38910143_1930000DBRU_Linux-x86-64.zip - LOCATED
-----------------------------------------------------

Simple and easy!

Missing Bundle Patches

At the time of writing, there are no Spatial or Oracle Text bundle patches for Oracle AI Database 26ai. AutoUpgrade reports:

Connected to MOS - Searching for specified patches

There were conditions found preventing AutoUpgrade Patching from successfully running

*Downloading files
Cannot find the Oracle Text patch
Cannot find the Oracle Spatial (SDO) patch

All necessary patches for Spatial and Oracle Text in Oracle AI Database 26ai are included in the latest Release Update.

This might change over time, and we may start to see bundle patches again.

Oracle Text

Fixes for Oracle Text are included in Release Updates whenever possible.

The Oracle Text bundle patch contains:

  1. Patches that haven’t made it into a Release Update yet.
  2. Patches that aren’t RAC Rolling installable.

Over time, you may see patches disappear from the bundle patch as they become part of the Release Update.

The Oracle Text bundle patch is also recommended for users of JSON and XML search indexes.

Additional Information

MOS Notes