Anyone working with Oracle databases knows the AutoUpgrade tool primarily as a utility for patches, release updates, or migrations. But what many don’t know: it can also be used to build a complete Oracle installation from scratch – automated and reproducible.
The following example refers to an Oracle Linux 9 installation. What do you need for this? The starting point is an account with Oracle Support. This should already be available in any professional environment anyway. Also required are a JDK version (currently 11) and of course the latest version of the autoupgrade.jar file.
dnf install java-11-openjdk -y
su - oracle
mkdir -p autoupgrade
mkdir -p /u01/app/oracle/product
cd autoupgrade
mkdir -p log globallog keystore software
wget https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar
Step 1: Creating a Wallet for Oracle Support
In the first step, a wallet is created to authenticate against Oracle Support. This wallet can then be used to automatically download all necessary installation files.
cat > keystore.cfg <<EOCAT
global.global_log_dir=/home/oracle/autoupgrade/globallog
global.keystore=/home/oracle/autoupgrade/keystore
EOCAT
java -jar autoupgrade.jar -config keystore.cfg -load_password -patch
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:
AutoUpgrade Patching keystore was successfully created
MOS> add -user
Enter your secret/Password:
Re-enter your secret/Password:
MOS> EXIT
MOS> exit
Save the AutoUpgrade Patching keystore before exiting [YES|NO] ? YES
Convert the AutoUpgrade Patching keystore to auto-login [YES|NO] ? YES
AutoUpgrade Patching Password Loader finished - Exiting AutoUpgrade Patching
Step 2: Downloading the Software
For Oracle 19, this specifically means: the Base Release 19.3, the current Release Update, the OJVM patch, opatch, and the Data Pump Bundle Patch. AutoUpgrade automatically identifies these components and places them in a previously defined directory. MPRs can also be included this way.
cat > download.cfg <<EOCAT
global.global_log_dir=/home/oracle/autoupgrade/globallog
global.keystore=/home/oracle/autoupgrade/keystore
patch1.patch=RECOMMENDED
patch1.patch=OPATCH
patch1.patch=19.30
patch1.folder=/home/oracle/autoupgrade/software
patch1.target_version=19
patch1.platform=LINUX.X64
EOCAT
After that, the download can be started. The config file contains further examples for selecting patches, etc.
java -jar autoupgrade.jar -patch -config download.cfg -mode download
Step 3: Creating the Oracle Home
Based on the downloaded files, the next step is to build an Oracle Home directly – that is, the actual software installation. This process also runs entirely through AutoUpgrade and requires no manual intervention.
cat > config.cfg <<EOCAT
global.global_log_dir=/home/oracle/autoupgrade/globallog
global.keystore=/home/oracle/autoupgrade/keystore
install.home_settings.binopt.part=YES
install.home_settings.binopt.rac=NO
install.home_settings.binopt.rat=NO
install.home_settings.binopt.uniaud=NO
install.patch=RU,OPATCH,OJVM
install.home_settings.edition=EE
install.home_settings.inventory_location=/u01/app/oraInventory
install.home_settings.oracle_base=/u01/app/oracle
install.home_settings.dba_group=dba
install.home_settings.oper_group=dba
install.home_settings.osdgdba_group=dba
install.home_settings.oskmdba_group=dba
install.home_settings.osracdba_group=dba
install.home_settings.read_only=YES
install.platform=LINUX.X64
install.target_home=/u01/app/oracle/product/19.30/dbhome_1
install.folder=/home/oracle/autoupgrade/software
install.download=NO
java -jar autoupgrade.jar -patch -config config.cfg -mode create_home
Step 4: Creating a Gold Image
In the final step, a so-called Gold Image can be created from the completed installation. The entire installed base is packaged into a ZIP file, which can then be distributed to any number of target servers. This is particularly useful in larger environments where a consistent software base needs to be ensured across many systems.
Conclusion AutoUpgrade has evolved from a pure upgrade tool into a fully-fledged deployment tool. Those who make use of this save themselves manual installation steps, reduce potential sources of error, and gain a reproducible, standardized foundation for all Oracle environments. And of course, AutoUpgrade can also be used with Oracle 26ai.
