Learn to patch the way God intended (S3E2)

AutoUpgrade: Creation and use of Gold Images

During the development of this patching series, the benefits of using Gold Images became evident, and thankfully, AutoUpgrade 26.2 now enables their download and use.

Here are the findings of my experiments; however, I recommend reading this article first to refresh your memory on how things were done previously.

First things first

We want to apply the latest Release Update (23.26.1) to our Oracle 26ai installations, including the recommended patches and the latest version of OPatch, and all for Linux.

38743961Database Release Update 23.26.1.0.0 (GOLD IMAGE)
38842609Datapump Bundle Patch 23.26.1.0.0
37393792ORA-12850 reported after applying DBRU on first node
6880880OPatch 12.2.0.1.49 for DB 23.0.0.0.0 (Jan 2026)

Downloading the Gold Image

AutoUpgrade requires initial setups that I have detailed in this article, so I recommend reading it if you haven’t yet, as from now on, it will be presumed that these steps have already been completed.

AutoUpgrade 26.2 introduces the gold_image parameter, which controls software downloads and handling. The possible values are:

NOA Gold Image is not requested, instead patches are downloaded one by one.
YESA Gold Image is requested, but this will not include one-off patches; these are downloaded individually.
ALLA Gold Image containing all the listed patches is requested.
AUTOAutoUpgrade will choose whether to use YES or NO.

Since we want to generate a ready-to-use Gold Image, we will set gold_image=ALL, as shown in the download.cfg configuration file:

global.global_log_dir=/stage/autoupgrade/log
global.keystore=/stage/autoupgrade/keystore
global.folder=/stage/autoupgrade/patches

patch1.patch=RU:23.26.1,OPATCH,DPBP,37393792
patch1.platform=LINUX.X64
patch1.gold_image=ALL

We first run AutoUpgrade to start the software download, with -mode download.

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

AutoUpgrade Patching 26.2.260205 launched with default internal options
Processing config file ...
Loading AutoUpgrade Patching keystore
AutoUpgrade Patching keystore is loaded

Connected to Oracle Updater service - Requesting gold images
AutoUpgrade Patching has finished processing the gold image requests

------------------------------------------------------------------------
Downloading files to /stage/autoupgrade/patches
------------------------------------------------------------------------
Gold Image - 23.26.1
    File: autoupgrade_linux-x86-64_23.26.1_db_home.zip - VALIDATED
------------------------------------------------------------------------

It took about an hour, but we finally got the requested Gold Image. It’s that plain and simple!

Installation with the Gold Image

Let’s create a new configuration file, which we’ll name create_oh.cfg.

Typically, software patches are downloaded from an internet-connected server and deployed on systems disconnected from the internet. As a result, in line 3, we specify that the patches are located in an NFS-shared folder.

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

install1.patch=RU:23.26.1,OPATCH,DPBP,37393792
install1.platform=LINUX.X64
install1.download=no
install1.gold_image=ALL

install1.target_home=/u01/app/oracle/23.0.0/db_2
install1.home_settings.oracle_base=/u01/app/oracle
install1.home_settings.edition=EE
install1.home_settings.inventory_location=/u01/app/oraInventory
install1.home_settings.home_name=DBHome2
install1.home_settings.osdba_group=dba
install1.home_settings.osbackupdba_group=backupdba
install1.home_settings.osdgdba_group=dgdba
install1.home_settings.oskmdba_group=kmdba
install1.home_settings.osracdba_group=racdba

We run AutoUpgrade a second time, this one to proceed with the installation, with -mode create_home:

$ java -jar autoupgrade.jar -config create_oh.cfg -patch -mode create_home

AutoUpgrade Patching 26.2.260205 launched with default internal options
Processing config file ...
Loading AutoUpgrade Patching keystore
AutoUpgrade Patching keystore is loaded

There were conditions found preventing AutoUpgrade Patching from successfully running

*Validating Oracle Patch files
Unable to find any gold image containing the requested patches--

We hit our first issue: AutoUpgrade does not identify the Gold Image we just downloaded as being valid.

After checking the logs without finding anything useful, it was time to get in touch with the engineers in charge of AutoUpgrade.

After exchanging further information, they replied that a file is created during downloads that records the mapping of known patch labels with their corresponding patch numbers.

Because I am installing on a different server than the one from which I downloaded the Gold Image, this file does not exist, and so AutoUpgrade fails to detect the patch number for, in my case, DPBP.

This file is called aru-bug-map.json, and in my setup, it has the following content (formatted for easier reading).

[
  {
    "prefix": "OJVM",
    "version": "19.30",
    "bugNumber": 38523609
  },
  {
    "prefix": "DPBP",
    "version": "19.30",
    "bugNumber": 38844733
  },
  {
    "prefix": "DPBP",
    "version": "23.26.1",
    "bugNumber": 38842609
  },
  {
    "prefix": "JDK",
    "version": "19.30",
    "bugNumber": 38586770
  },
  {
    "prefix": "OCW",
    "version": "19.30",
    "bugNumber": 38629535
  }
]

In lines 13-15, we find that DPBP for Oracle 23.26.1 is patch 38842609.

We will now proceed to copy the file to the server where we are running the installation:

$ cp /NFS/autoupgrade/log/cfgtoollogs/patch/auto/aru/aru-bug-map.json \
/stage/autoupgrade/log/cfgtoollogs/patch/auto/aru/.

Then we make a third call to AutoUpgrade:

$ java -jar autoupgrade.jar -config create_oh.cfg -patch -mode create_home

AutoUpgrade Patching 26.2.260205 launched with default internal options
Processing config file ...
Loading AutoUpgrade Patching keystore
AutoUpgrade Patching keystore is loaded

There were conditions found preventing AutoUpgrade Patching from successfully running

*Validating Oracle Patch files
Unable to find any gold image containing the requested patches--

But the problem is still there: AutoUpgrade doesn’t identify the Gold Image as valid for our request, and no one knows what’s going on!

Now you see it, now you don't

In this article, Rodrigo Jorge shows how to check the fixes contained in a Gold Image that he downloaded with AutoUpgrade. I decided to try it:

$ unzip -j /NFS/autoupgrade/patches/autoupgrade_linux-x86-64_23.26.1_db_home.zip \
inventory/ContentsXML/oui-patch.xml

Archive:  /NFS/autoupgrade/patches/db_home_23_26_1-gold.zip
  inflating: oui-patch.xml
  
$ xmllint --xpath '//ONEOFF[@TYPE="unknown"]/DESC' oui-patch.xml \
     | sed 's:</DESC>:</DESC>\n:g' \
     | sed -n 's:.*<DESC>\(.*\)</DESC>:\1:p'

Database Release Update : 23.5.0.24.07 (36741532) Gold Image
OCW RELEASE UPDATE 23.5.0.24.07 (36744688) Gold Image
Database Release Update : 23.26.1.0.0 (38743669)
OCW RELEASE UPDATE 23.26.1.0.0 (38743688)
DATAPUMP BUNDLE PATCH 23.26.1.0.0

What a surprise! Patch 37393792 is not there; only RU 23.26.1, OCW, and DPBP show up.

Is this a bug in AutoUpgrade or the My Oracle Support Gold Image Creation Service? That is still to be determined; however, I have already brought it to the attention of the engineers in charge of AutoUpgrade, and we agree that it is not a bad idea for it to confirm after download that the Gold Image contains all of the requested patches.

Downloading Gold Image, second try

While Oracle analyses and fixes the issue, we will have to cope with it as best we can.

We’ll start by getting the missing patch, this time with gold_image=AUTO.

global.global_log_dir=/stage/autoupgrade/log
global.keystore=/stage/autoupgrade/keystore
global.folder=/stage/autoupgrade/patches

patch1.patch=RU:23.26.1,OPATCH,DPBP,37393792
patch1.platform=LINUX.X64
patch1.gold_image=AUTO

AutoUpgrade looks at the list of patches specified in the configuration file, scans the patches in the download folder, determines what is missing, and then downloads them.

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

AutoUpgrade Patching 26.2.260205 launched with default internal options
Processing config file ...
Loading AutoUpgrade Patching keystore
AutoUpgrade Patching keystore is loaded

Connected to Oracle Updater service - Requesting gold images
AutoUpgrade Patching has finished processing the gold image requests

Connected to MOS - Searching for specified patches

------------------------------------------------------------------------
Downloading files to /stage/autoupgrade/patches
------------------------------------------------------------------------
OPatch 12.2.0.1.49 for DB 23.0.0.0.0 (Jan 2026)
    File: p6880880_230000_Linux-x86-64.zip - VALIDATED

ORA-12850 REPORTED AFTER APPLYING DBRU ON FIRST NODE
    File: p37393792_2326100DBRU_Linux-x86-64.zip - VALIDATED
------------------------------------------------------------------------

Creating the full Gold Image

Because AutoUpgrade failed to download a Gold Image as requested, we have no choice but to create it ourselves.

The first step will be to change the configuration file to instruct AutoUpgrade to run the installation using what has already been downloaded, using gold_image=AUTO.

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

install1.patch=RU:23.26.1,OPATCH,DPBP,37393792
install1.platform=LINUX.X64
install1.download=no
install1.gold_image=AUTO

install1.target_home=/u01/app/oracle/23.0.0/db_2
install1.home_settings.oracle_base=/u01/app/oracle
install1.home_settings.edition=EE
install1.home_settings.inventory_location=/u01/app/oraInventory
install1.home_settings.home_name=DBHome2
install1.home_settings.osdba_group=dba
install1.home_settings.osbackupdba_group=backupdba
install1.home_settings.osdgdba_group=dgdba
install1.home_settings.oskmdba_group=kmdba
install1.home_settings.osracdba_group=racdba

Then we call AutoUpgrade again and wait.

$ java -jar autoupgrade.jar -config create_oh.cfg -patch -mode create_home

AutoUpgrade Patching 26.2.260205 launched with default internal options
Processing config file ...
Loading AutoUpgrade Patching keystore
AutoUpgrade Patching keystore is loaded
+-----------------------------------------+
| Starting AutoUpgrade Patching execution |
+-----------------------------------------+
Type 'help' to list console commands
patch> Job 100 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished                  [1]
Jobs failed                    [0]
Jobs restored                  [0]
Jobs pending                   [0]

# Run the root.sh script as root for the following jobs:
For create_home_1 -> /u01/app/oracle/23.0.0/db_2/root.sh

Please check the summary report at:
/home/oracle/autoupgrade/log/cfgtoollogs/patch/auto/status/status.html
/home/oracle/autoupgrade/log/cfgtoollogs/patch/auto/status/status.log

The logs show that Autouprade completed the installation by using the Gold Image and the previously downloaded patches.

2026-02-15 11:16:37.234 INFO The following patches will be used for this job:
/vagrant_software/autoupgrade/patches/autoupgrade_linux-x86-64_23.26.1_db_home.zip - Database Release Update : 23.26.1.0.0 (38743669)
/vagrant_software/autoupgrade/patches/p6880880_230000_Linux-x86-64.zip - OPatch - 12.2.0.1.49
/vagrant_software/autoupgrade/patches/p37393792_2326100DBRU_Linux-x86-64.zip - ORA-12850 REPORTED AFTER APPLYING DBRU ON FIRST NODE
2026-02-15 11:16:37.395 INFO No user defined actions were specified
2026-02-15 11:16:37.457 INFO The file /vagrant_software/autoupgrade/patches/autoupgrade_linux-x86-64_23.26.1_db_home.zip is being extracted to /u01/app/oracle/23.0.0/db_2
2026-02-15 11:17:52.583 INFO Successfully extracted the gold image to /u01/app/oracle/23.0.0/db_2
2026-02-15 11:17:52.620 INFO The file /vagrant_software/autoupgrade/patches/p6880880_230000_Linux-x86-64.zip is being extracted to /u01/app/oracle/23.0.0/db_3
2026-02-15 11:17:52.917 INFO The existing autoupgrade.jar is not going to be updated within the new ORACLE_HOME

At last, we have an Oracle Home with all the patches we needed.

$ $ORACLE_HOME/OPatch/opatch lspatches
37393792;ORA-12850 REPORTED AFTER APPLYING DBRU ON FIRST NODE
38842609;DATAPUMP BUNDLE PATCH 23.26.1.0.0
38743688;OCW RELEASE UPDATE 23.26.1.0.0 (38743688)
38743669;Database Release Update : 23.26.1.0.0 (38743669)

We can now proceed to manually build the Gold Image using the Oracle Home we just installed.

${ORACLE_HOME}/runInstaller -silent -createGoldImage \
-destinationLocation /NFS/autoupgrade/patches \
-name db_home_23_26_1-gold.zip

Launching Oracle AI Database Setup Wizard...

Successfully Setup Software.
Gold Image location: /NFS/autoupgrade/patches/db_home_23_26_1-gold.zip

As a result, we now have two Gold Images: the incomplete one generated by AutoUpgrade and the complete one we made ourselves; the latter will be used to patch all of the servers that need it.

$ ls -la /NFS/autoupgrade/patches

total 8176436
drwxrwxr-x 2 Feb 15 12:39 .
drwxrwxr-x 8 Feb 15 12:30 ..
-rw-rw-r-- 1 Feb 15 12:27 autoupgrade_linux-x86-64_23.26.1_db_home.zip
-rw-r--r-- 1 Feb 15 12:45 db_home_23_26_1-gold.zip
-rw-rw-r-- 1 Feb 15 12:30 p37393792_2326100DBRU_Linux-x86-64.zip
-rw-rw-r-- 1 Feb 15 12:30 p6880880_230000_Linux-x86-64.zip
-rw-rw-r-- 1 Feb 15 12:30 patches_info.json

Installation with the Gold Image, second try

Now that we have a Gold Image with all the needed patches, it’s time to edit the configuration file to indicate to AutoUpgrade that it can only use Gold Images during the installation. This is done with gold_image=ALL.

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

install1.patch=RU:23.26.1,OPATCH,DPBP,37393792
install1.platform=LINUX.X64
install1.download=no
install1.gold_image=ALL

install1.target_home=/u01/app/oracle/23.0.0/db_3
install1.home_settings.oracle_base=/u01/app/oracle
install1.home_settings.edition=EE
install1.home_settings.inventory_location=/u01/app/oraInventory
install1.home_settings.home_name=DBHome3
install1.home_settings.osdba_group=dba
install1.home_settings.osbackupdba_group=backupdba
install1.home_settings.osdgdba_group=dgdba
install1.home_settings.oskmdba_group=kmdba
install1.home_settings.osracdba_group=racdba

We let AutoUpgrade do its job and wait.

$ java -jar autoupgrade.jar -config create_oh.cfg -patch -mode create_home

AutoUpgrade Patching 26.2.260205 launched with default internal options
Processing config file ...
Loading AutoUpgrade Patching keystore
AutoUpgrade Patching keystore is loaded
+-----------------------------------------+
| Starting AutoUpgrade Patching execution |
+-----------------------------------------+
Type 'help' to list console commands
patch> Job 100 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished                  [1]
Jobs failed                    [0]
Jobs restored                  [0]
Jobs pending                   [0]

# Run the root.sh script as root for the following jobs:
For create_home_1 -> /u01/app/oracle/23.0.0/db_3/root.sh

Please check the summary report at:
/home/oracle/autoupgrade/log/cfgtoollogs/patch/auto/status/status.html
/home/oracle/autoupgrade/log/cfgtoollogs/patch/auto/status/status.log

AutoUpgrade used our Gold Image and completed the installation, as confirmed by the logs.

2026-02-15 12:35:32.578 INFO The following patches will be used for this job:
/NFS/autoupgrade/patches/db_home_23_26_1-gold.zip - Database Release Update : 23.26.1.0.0 (38743669)
2026-02-15 12:35:32.698 INFO No user defined actions were specified
2026-02-15 12:35:32.732 INFO The file /NFS/autoupgrade/patches/db_home_23_26_1-gold.zip is being extracted to /u01/app/oracle/23.0.0/db_3
2026-02-15 12:36:46.412 INFO Successfully extracted the gold image to /u01/app/oracle/23.0.0/db_3
2026-02-15 12:36:46.453 INFO The existing OPatch tool is not going to be updated within the new ORACLE_HOME
2026-02-15 12:36:46.453 INFO The existing autoupgrade.jar is not going to be updated within the new ORACLE_HOME

And, after multiple attempts, we now have an Oracle Home with all of the necessary patches.

$ $ORACLE_HOME/OPatch/opatch lspatches
37393792;ORA-12850 REPORTED AFTER APPLYING DBRU ON FIRST NODE
38842609;DATAPUMP BUNDLE PATCH 23.26.1.0.0
38743688;OCW RELEASE UPDATE 23.26.1.0.0 (38743688)
38743669;Database Release Update : 23.26.1.0.0 (38743669)

Final thoughts

This is the third article I have written about AutoUpgrade, and as you may have noticed, it is a tool that simplifies the routine tasks of downloading patches and installing a new Oracle Home, but it has some limitations and bugs that require us to supplement it with manual tasks.:

  1. If we want a one-off, it forces us to download the RU. Proposed improvement: Allow the RU related to the patch to be specified (patch=37393792:23.26.0).
  2. Only allows downloads of patches related to RU, not OJVM. Example: patch 38844367, recommended for OJVM RU 19.30.
  3. The downloaded Gold Image does not always include all the requested patches. Proposed improvement: perform a final validation of the patch list in the file retrieved from MOS.
  4. When creating a new Oracle Home on a server other than the one used to download the Gold Image, cannot map the labels (DPBP, OCW, etc.) with their respective patch numbers. There are two workarounds: (a) use the patch number (38842609) directly instead of the label (DPBP); (b) copy the aru-bug-map.json file.

Regardless, AutoUpgrade is a completely functional tool for almost any everyday scenario, which is why I recommend you try it out as soon as possible—it will surely make your life easier!

Did you find this article interesting, did you have any doubts, do you want to suggest a topic to cover, leave me your comments or contact me me right now!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

AutoUpgrade patching - final situation
Learn how to patch Oracle Single Instance databases with AutoUpgrade.
www.freepik.com
Learn how to download Oracle patches using the autoupgrade utility in addition to getMOSPatch.
Hide column contents
Learn how to use Real Application Security to implement the masking of column contents dynamically and without having to modify your code.

Añade aquí tu texto de cabecera

Need Help?

Fill in these details and I will be in touch as soon as possible.