Since October 2024, the Oracle Database Upgrade team has made many improvements in AutoUpgrade Patching. The most expressive one is adding the capability for it to connect on MOS, download patches automatically, create a new Oracle home with all those patches applied, and finally move the database from the old Oracle home to a new Oracle home.
However, if your database server has no internet connectivity (what is expected) even via proxy, you can download patches on a different server or your own notebook and later moved them to a shared NFS server that this server has access to, for example.
In this article, we will check how this can be performed with AutoUpgrade Patching on 3 different hosts: MacOS, Windows and Linux.
MacOS
My working PC is a Mac. After I download the latest version of AU, I need to create a config file.
The only parameters required are the following:
% cat download.cfg global.global_log_dir=/Users/rodrigo.jorge/test/AU_Patching/logs global.keystore=/Users/rodrigo.jorge/test/AU_Patching/keys patch1.folder=/Users/rodrigo.jorge/test/AU_Patching/patches patch1.patch=RU,DPBP,OPATCH,OJVM patch1.target_version=19
So, if I call AU now using this config file:
% java -jar autoupgrade.jar -patch -config download.cfg -mode download AutoUpgrade Patching 24.1.241105 launched with default internal options Processing config file ... There were conditions found preventing AutoUpgrade Patching from successfully running *Downloading Oracle Patch files Patch query failed *Operation requires MOS credentials to be loaded into keystore. Use -load_password option*
It is complaining, of course, that I still haven't loaded the MOS Credentials. So it would be impossible to download anything from MOS. So let me load my credentials:
% java -jar autoupgrade.jar -patch -config download.cfg -load_password Processing config file ... Starting AutoUpgrade Patching Password Loader - Type help for available options Creating new AutoUpgrade Patching keystore - Password required Enter password: <<< (HERE I TYPE A PASSWORD FOR THE AU WALLET, NOT MY USER PASSWORD) Enter password again: AutoUpgrade Patching keystore was successfully created MOS> add -user rodrigoaraujorge@hotmail.com Enter your secret/Password: Re-enter your secret/Password: MOS> save Convert the AutoUpgrade Patching keystore to auto-login [YES|NO] ? YES MOS> exit AutoUpgrade Patching Password Loader finished - Exiting AutoUpgrade Patching
It's all set. Please note that I converted the "AutoUpgrade Patching keystore" to auto-login, so I don't need to retype the wallet password that I created to hold my MOS credentials every time, which is good for automation.
Now, calling AU again to download the files:
% java -jar autoupgrade.jar -patch -config download.cfg -mode download AutoUpgrade Patching 24.1.241105 launched with default internal options Processing config file ... Loading AutoUpgrade Patching keystore AutoUpgrade Patching keystore was successfully loaded Connected to MOS - Searching for specified patches ------------------------------------------------------------------ Downloading files to /Users/rodrigo.jorge/test/AU_Patching/patches ------------------------------------------------------------------ DATABASE RELEASE UPDATE 19.25.0.0.0 File: p36912597_190000_Linux-x86-64.zip - VALIDATED DATAPUMP BUNDLE PATCH 19.25.0.0.0 File: p37056207_1925000DBRU_Generic.zip - VALIDATED OJVM RELEASE UPDATE 19.25.0.0.0 File: p36878697_190000_Linux-x86-64.zip - VALIDATED OPatch 12.2.0.1.44 for DB 19.0.0.0.0 (Oct 2024) File: p6880880_190000_Linux-x86-64.zip - LOCATED ------------------------------------------------------------------
As you can see, based on the parameter that I provided, "patch=RU,DPBP,OPATCH,OJVM," it downloads the latest RU (as of today, 19.25), the latest OPATCH, and the OJVM and DPBP related to the downloaded RU.
You could do some other combinations. For example:
- patch=RU:19.17,DPBP,OPATCH,OJVM
This will download RU 19.17, latest OPatch, and OJVM 19.17 and DPBP 19.17, because we always download OJVM and DPBP related with the RU. - patch=RU:19.17,DPBP,OPATCH,OJVM:19.25
This will download RU 19.17, latest OPatch, and OJVM 19.25 and DPBP 19.17, because we always specified another OJVM and DPBP is always related with the RU. - patch=RU,OPATCH,35197819
This will download latest RU, latest OPatch, and patch 35197819. - patch=35197819
This will download just the patch 35197819. (This is still not supported, RU and OPATCH are always required, but it will be allowed on the next releases)
Please note that if you specify the database version on the patch parameter, like patch=RU:19.17 , it is not required to add the parameter target_version=19 as we already know what is the target version. This is used so the code knows if you want to download patches from 19c, 21c or 23ai. (As of today, only 19c is supported but other versions will be added on the next releases).
But wait! It downloads patches for Linux on my MacOS. What if I wanted to download Windows or AIX or any other platform instead?
On the next AU release (24.8 or 25.1), you can add:
patch1.platform=windows.x64
The current valid values are linux.x64 and windows.x64. When not specified, it will default to the system you are. If you are not on a system that is part of the available options, it will default to linux.x64. In the future, we plan to include AIX, Solaris, ARM and all the versions supported by 19c, 21c and 23ai.
Example of a config file to download Windows patches:
% cat download.cfg global.global_log_dir=/Users/rodrigo.jorge/test/AU_Patching/logs global.keystore=/Users/rodrigo.jorge/test/AU_Patching/keys patch1.folder=/Users/rodrigo.jorge/test/AU_Patching/patches patch1.patch=RU,OPATCH,OJVM patch1.target_version=19 patch1.platform=windows.x64
if I call AU now using this config file:
% java -jar autoupgrade.jar -patch -config download.cfg -mode download AutoUpgrade Patching 24.1.241105 launched with default internal options Processing config file ... Loading AutoUpgrade Patching keystore AutoUpgrade Patching keystore was successfully loaded Connected to MOS - Searching for specified patches ------------------------------------------------------------------ Downloading files to /Users/rodrigo.jorge/test/AU_Patching/patches ------------------------------------------------------------------ WINDOWS DATABASE BUNDLE PATCH 19.25.0.0.241015 File: p36878821_190000_MSWIN-x86-64.zip - VALIDATED OJVM RELEASE UPDATE 19.25.0.0.0 File: p36878697_190000_MSWIN-x86-64.zip - VALIDATED OPatch 12.2.0.1.44 for DB 19.0.0.0.0 (Oct 2024) File: p6880880_190000_MSWIN-x86-64.zip - VALIDATED ------------------------------------------------------------------
Linux
If you want to download from Linux, this is exactly the same as in MacOS:
[oracle@holserv1:~/test/AU_Patching]$ cat download.cfg global.global_log_dir=/home/oracle/test/AU_Patching/logs global.keystore=/home/oracle/test/AU_Patching/keys patch1.folder=/home/oracle/test/AU_Patching/patches patch1.patch=RU,DPBP,OPATCH,OJVM patch1.target_version=19 [oracle@holserv1:~/test/AU_Patching]$ java -jar autoupgrade.jar -patch -config download.cfg -mode download AutoUpgrade Patching 24.1.241105 launched with default internal options Processing config file ... Loading AutoUpgrade Patching keystore AutoUpgrade Patching keystore was successfully loaded Connected to MOS - Searching for specified patches ---------------------------------------------------------- Downloading files to /home/oracle/test/AU_Patching/patches ---------------------------------------------------------- DATABASE RELEASE UPDATE 19.25.0.0.0 File: p36912597_190000_Linux-x86-64.zip - VALIDATED DATAPUMP BUNDLE PATCH 19.25.0.0.0 File: p37056207_1925000DBRU_Generic.zip - VALIDATED OJVM RELEASE UPDATE 19.25.0.0.0 File: p36878697_190000_Linux-x86-64.zip - VALIDATED OPatch 12.2.0.1.44 for DB 19.0.0.0.0 (Oct 2024) File: p6880880_190000_Linux-x86-64.zip - VALIDATED ----------------------------------------------------------
Windows
Windows support is coming soon. The idea is that you create a config file just like you would on MacOS and Linux and run it.
Example:
global.global_log_dir=C:\Users\opc\Desktop\AU_Patching\logs global.keystore=C:\Users\opc\Desktop\AU_Patching\keys patch1.folder=C:\Users\opc\Desktop\AU_Patching\patches patch1.patch=RU,OPATCH,OJVM patch1.target_version=19
As soon as I have some beta version working for Windows, I will update this section with more details.
Download
To download the latest release of AutoUpgrade Patching, please go to: https://support.oracle.com/epmos/faces/DocumentDisplay?id=2485457.1
Learn More
If you want to learn more about the tool, I really recommend watching our VC#21 1h video:
Have you enjoyed? Please leave a comment or give a 👍!
5 comments
Skip to comment form
Hello Rodrigo,
does it work for RAC homes too?
Author
Hi David,
Not yet but we plan to support them on the next releases.
Thanks,
RJ
HI Hello Rodrigo,
I did testing autoupgrade (build.version 24.7.241021) patching with oracle 19c running on
Oracle linux OS platform like Linux 8 and OL9. it need to set variable CV_ASSUME_DISTID has to set to 7.9
and CV_ASSUME_DISTID =OL8 for Oracle Linux 9
As in log I notice , AutoUpgrade will install sofware base binary on the target home first before it start apply patching the new patching version as this senarios it is not work for Oracle Linux 9 ( I used oracle linux 9.4) which cause install sofware binary on new home fail
it is great if in next release AutoUpgrade version will install sofware binary with RU patch ( ./runInstaller -applyRU)
Hi Rodrigo,
Is this for 19C database or it will work for 11g and 12c as well?
Hi Rodrigo,
Int he config file, just to be able to download, not deploy (as I understand deployment works only for single instance, 19c, Linux for now) I was wondering if I can specify the patch number and be able to download a particular patch. we do have Grid Infrastructure setup, so along with RU, OPATCH and OJVM, if we can download GI download - this tool would work great for us.
thanks, Geeta