Introduction
The AutoUpgrade utility is designed to automate the upgrade process, both before starting upgrades, during upgrade deployments, and during postupgrade checks and configuration migration
The Oracle AutoUpgrade Tool is part of Oracle Home since the version 12.1.0.2.
It’s a java-based program which can be download on MySupport Oracle : ID 2485457.1
It’s recommanded to use the lastest version (as usual, like for opatch by example).
The most important point is that Oracle desupport DBUA (Database Upgrade Assistant) and other manual upgrade to Oracle 23ai. AutoUpgrade is the only supported method.
This tab show the supported sources database version and the supported target database version for AutoUpgrade
Source Database Version | |
---|---|
11.2.0.4 | 12.2.0.1 (12.2 + DBJAN2019RU and newer) |
12.1.0.2 | 18c (18.5 and newer) |
12.2.0.1 | 19c (19.3 and newer) |
18c | 21c (21.3 and newer) |
19c | 23ai (23.4 and newer) |
Any future release |
The AutoUpgrade workflow
Using AutoUpgrade is running four simple steps :
- Prepare
- Analyze
- Fixups
- Deploy
Prepare
The first step is about downloading all binairies that we need to patching or upgrade our databases. And to create a configuration file used by AutoUpgrade for known what to do and where do it.
- Download lastest version of AutoUpgrade -> My Oracle Support ID 2485457.1
- Download lastet version of opatch -> My Oracle Support ID 224346.1
- Download DBRU + OJVM+ DPBP+ Most Important One-off Patches -> My Oracle Support ID 2118136.2 + ID 555.1
The configuration file used by AutoUpgrade must contain some informations like :
- Source Oracle Home
- Target Oracle Home
- Patches repository
- Source Database SID
- and other advanced option
We will see that later in this blog, no worries!
Analyze
It’s the classic precheck used during all patch, upgrade process lead by Oracle.
Fixups
Automatic or manual Fixups, if necessary.
Deploy
It’s the main step where AutoUpgrade run the upgrade process on your source database.
In case of failure, AutoUpgrade is able to restart where it fails on… After have fixed the errors by yourself!
A simple example
For this labs, we have :
- Oracle Linux Server 8
- Oracle Database Home 19.24 installed in /u01/app/oracle/product/19.24/dbhome_1
- Oracle standalone database : DB19
We want to patch this database to the 19.28 version, according to the Best Pratices (for this check Mike Dietrich blogs : https://mikedietrichde.com/ ).
Preparation
We download the following patches :
- Patch 37960098 : DBRU 19.28
- Patch 38170982 : Data Pump Bundle Patches (My Oracle Support ID 2819284.1)
- Patch 37847857 : OJVM 19.28
- Patch 34672698 : [VOS] DB50: ORA-800: soft external error, arguments: [set priority failed], [vktm] , dism(16)
- Patch 34774667 : [AQ] ORA-7445 in Purge Queue Table / High CPU usage in SVCB Service
- Patch 29213893 : [QRY OPTIMIZER] DBMS_STATS Failing With Error Ora-1422 When Gathering Stats for User$ Table
We save them in the repository /home/oracle/autoupgrade/patches (for example).
We download in the same manner the lastest version of Opatch following the Oracle MySupport ID 224346.1 :
How to install OPatch utility ?
- Download the latest Opatch utility
Search for Patch 6880880 in MOS or from the URL
https://updates.oracle.com/download/6880880.html - Take a backup of older version of OPatch utility under $ORACLE_HOME and unzip the downloaded file
cd $ORACLE_HOME
mv OPatch OPatch.bkp
unzip <download directory>/p6880880_<version>_<platform>.zip
cd OPatch
./opatch version
The most recent version of AutoUpgrade, 25.3 is a fully supported version and can be downloaded via this link: version 20250509 or directly from oracle.com.
Oracle strongly recommends that you always use the latest version of AutoUpgrade. AutoUpgrade is backward compatible and can upgrade older releases of Oracle Database as well.
The latest ORDS 25.1 can be found from here which supports AutoUpgrade REST API.
The last step of the preparation is to create the configuration file used by AutoUpgrade for our patching.
An simple config file look like (/home/oracle/patch_DB19.cfg) :
global.global_log_dir=/home/oracle/autoupgrade-patching/log
patch1.sid=DB19
patch1.log_dir=/home/oracle/autoupgrade-patching/DB19/log
patch1.source_home=/u01/app/oracle/product/19.24/dbhome_1
patch1.target_home=/u01/app/oracle/product/19.28/dbhome_1
patch1.restoration=YES
patch1.drop_grp_after_patching=YES
patch1.folder=/home/oracle/autoupgrade/patches
patch1.patch=RU,OJVM,OPATCH,DPBP,34672698,34774667,29213893
patch1.download=NO
An excellent tool for building this configuration file can be found at : https://viniciusdba.com.br/autoupgrade-composer/
I must say : use it!!
Some explanation about the parameters :
- source_home : the current Oracle Home used by the instance DB19
- target_home : the new Oracle Home targeted
- restoration : AutoUpgrade can create a Guaranteed Restore Point before the upgrade/patching operations
- drop_grp_after_patching=YES : after a successful AutoUpgrade, by default, don’t suppress the GRP created before. With this parameter, it will be dropped after successful patching.
- folder : the full path to the repository where the patches has been downloaded.
- patch : what we want to patch :
- RU : Release Update
- OJVM: Oracle Java Virtual Machine
- Opatch
- DPBP : Data Pump Bundle Patch
- id of specific patches
- download : we can ask to Auto Upgrade to download itself the patches.
Now, we have all the stuff to begin our database patching!
Analyze
Just run the following command :
java -jar autoupgrade.jar -config /home/oracle/patch_DB19.cfg -patch -mode analyze
The output look like :
AutoUpgrade Patching 25.3.250509 launched with default internal options
Processing config file ...
+-----------------------------------------+
| Starting AutoUpgrade Patching execution |
+-----------------------------------------+
1 Non-CDB(s) will be analyzed
Type 'help' to list console commands
patch> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME| STAGE|OPERATION| STATUS|START_TIME|UPDATED| MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 100| DB19|PRECHECKS|EXECUTING|RUNNING| 15:15:39|28s ago|Executing Checks|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1
patch> status -job 100
Details
Job No 100
Oracle SID DB19
Start Time 25/07/16 15:15:39
Elapsed (min): 0
End time: N/A
Logfiles
Logs Base: /home/oracle/autoupgrade-patching/simple-patching/log/DB19
Job logs: /home/oracle/autoupgrade-patching/simple-patching/log/DB19/100
Stage logs: /home/oracle/autoupgrade-patching/simple-patching/log/DB19/100/prechecks
TimeZone: /home/oracle/autoupgrade-patching/simple-patching/log/DB19/temp
Remote Dirs:
Stages
PENDING <1 min
PRECHECKS ~0 min (RUNNING)
Stage-Progress Per Container
+--------+---------+
|Database|PRECHECKS|
+--------+---------+
| DB19| 98 % |
+--------+---------+
patch> Job 100 completed
------------------- Final Summary --------------------
Number of databases [ 1 ]
Jobs finished [1]
Jobs failed [0]
Please check the summary report at:
/home/oracle/autoupgrade-patching/simple-patching/log/cfgtoollogs/patch/auto/status/status.html
/home/oracle/autoupgrade-patching/simple-patching/log/cfgtoollogs/patch/auto/status/status.log
We control the success or errors that can be occured during analyze :
# cat /home/oracle/autoupgrade-patching/simple-patching/log/cfgtoollogs/patch/auto/status/status.log
==========================================
AutoUpgrade Patching Summary Report
==========================================
[Date] Wed Jul 16 15:17:31 GMT 2025
[Number of Jobs] 1
==========================================
[Job ID] 100
==========================================
[DB Name] DB19
[Version Before AutoUpgrade Patching] 19.24.0.0.240716
[Version After AutoUpgrade Patching] 19.28.0.0.250715
------------------------------------------
[Stage Name] PENDING
[Status] SUCCESS
[Start Time] 2025-07-16 15:15:39
[Duration] 0:00:00
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/100/pending
------------------------------------------
[Stage Name] PRECHECKS
[Status] SUCCESS
[Start Time] 2025-07-16 15:15:39
[Duration] 0:01:52
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/100/prechecks
[Detail] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/100/prechecks/DB19_preupgrade.log
Check passed and no manual intervention needed
------------------------------------------
The analyze is OK, we can proceed further and deploy the patch.
Deploy
Just run the following command :
java -jar autoupgrade.jar -config /home/oracle/patch_DB19.cfg -patch -mode deploy
The output look like :
AutoUpgrade Patching 25.3.250509 launched with default internal options
Processing config file ...
+-----------------------------------------+
| Starting AutoUpgrade Patching execution |
+-----------------------------------------+
1 Non-CDB(s) will be processed
Type 'help' to list console commands
patch> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME| STAGE|OPERATION| STATUS|START_TIME|UPDATED| MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 101| DB19|PRECHECKS|EXECUTING|RUNNING| 15:34:17| 5s ago|Executing Checks|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1
Details
Job No 101
Oracle SID DB19
Start Time 25/07/16 15:34:17
Elapsed (min): 22
End time: N/A
Logfiles
Logs Base: /home/oracle/autoupgrade-patching/simple-patching/log/DB19
Job logs: /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101
Stage logs: /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/patching
TimeZone: /home/oracle/autoupgrade-patching/simple-patching/log/DB19/temp
Remote Dirs:
Stages
PENDING <1 min
GRP <1 min
PREACTIONS <1 min
PRECHECKS 1 min
PREFIXUPS 1 min
EXTRACT <1 min
INSTALL <1 min
ROOTSH <1 min
DBTOOLS <1 min
OPATCH 12 min
PATCHING ~5 min (RUNNING)
POSTCHECKS
POSTFIXUPS
POSTACTIONS
Stage-Progress Per Container
The Stage PATCHING does not have any data to show
Job 101 completed
------------------- Final Summary --------------------
Number of databases [ 1 ]
Jobs finished [1]
Jobs failed [0]
Jobs restored [0]
Jobs pending [0]
---- Drop GRP at your convenience once you consider it is no longer needed ----
Drop GRP from DB19: drop restore point AU_PATCHING_9212_DB191928000
Please check the summary report at:
/home/oracle/autoupgrade-patching/simple-patching/log/cfgtoollogs/patch/auto/status/status.html
/home/oracle/autoupgrade-patching/simple-patching/log/cfgtoollogs/patch/auto/status/status.log
We control the success or errors that can be occured during the deploiement:
# cat /home/oracle/autoupgrade-patching/simple-patching/log/cfgtoollogs/patch/auto/status/status.log
==========================================
AutoUpgrade Patching Summary Report
==========================================
[Date] Wed Jul 16 15:56:46 GMT 2025
[Number of Jobs] 1
==========================================
[Job ID] 101
==========================================
[DB Name] DB19
[Version Before AutoUpgrade Patching] 19.24.0.0.240716
[Version After AutoUpgrade Patching] 19.28.0.0.250715
------------------------------------------
[Stage Name] PENDING
[Status] SUCCESS
[Start Time] 2025-07-16 15:34:18
[Duration] 0:00:00
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/pending
------------------------------------------
[Stage Name] GRP
[Status] SUCCESS
[Start Time] 2025-07-16 15:34:18
[Duration] 0:00:01
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/grp
[Detail] Please drop the following GRPs after {0} completes:
AU_PATCHING_9212_DB191928000
------------------------------------------
[Stage Name] PREACTIONS
[Status] SUCCESS
[Start Time] 2025-07-16 15:34:19
[Duration] 0:00:00
------------------------------------------
[Stage Name] PRECHECKS
[Status] SUCCESS
[Start Time] 2025-07-16 15:34:19
[Duration] 0:01:21
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/prechecks
[Detail] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/prechecks/DB19_preupgrade.log
Check passed and no manual intervention needed
------------------------------------------
[Stage Name] PREFIXUPS
[Status] SUCCESS
[Start Time] 2025-07-16 15:35:40
[Duration] 0:01:20
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/prefixups
[Detail] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/prefixups/prefixups.html
------------------------------------------
[Stage Name] EXTRACT
[Status] SUCCESS
[Start Time] 2025-07-16 15:37:00
[Duration] 0:00:49
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/extract
------------------------------------------
[Stage Name] INSTALL
[Status] SUCCESS
[Start Time] 2025-07-16 15:37:50
[Duration] 0:00:52
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/install
------------------------------------------
[Stage Name] ROOTSH
[Status] SUCCESS
[Start Time] 2025-07-16 15:38:43
[Duration] 0:00:00
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/rootsh
------------------------------------------
[Stage Name] DBTOOLS
[Status] SUCCESS
[Start Time] 2025-07-16 15:38:43
[Duration] 0:00:02
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/dbtools
------------------------------------------
[Stage Name] OPATCH
[Status] SUCCESS
[Start Time] 2025-07-16 15:38:45
[Duration] 0:12:19
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/opatch
------------------------------------------
[Stage Name] PATCHING
[Status] SUCCESS
[Start Time] 2025-07-16 15:51:05
[Duration] 0:05:37
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/patching
------------------------------------------
[Stage Name] POSTCHECKS
[Status] SUCCESS
[Start Time] 2025-07-16 15:56:42
[Duration] 0:00:00
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/postchecks
[Detail] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/postchecks/DB19_postupgrade.log
Check passed and no manual intervention needed
------------------------------------------
[Stage Name] POSTFIXUPS
[Status] SUCCESS
[Start Time] 2025-07-16 15:56:43
[Duration] 0:00:02
[Log Directory] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/postfixups
[Detail] /home/oracle/autoupgrade-patching/simple-patching/log/DB19/101/postfixups/postfixups.html
------------------------------------------
[Stage Name] POSTACTIONS
[Status] SUCCESS
[Start Time] 2025-07-16 15:56:46
[Duration] 0:00:00
------------------------------------------
Checking
sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jul 16 16:05:31 2025
Version 19.28.0.0.0
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.28.0.0.0
SQL> col oracle_home format a60
select sys_context('USERENV','ORACLE_HOME') as oracle_home from dual;
ORACLE_HOME
------------------------------------------------------------
/u01/app/oracle/product/19.28/dbhome_1
SQL> col comp_id format a10
col version_full format a15
col status format a15
select comp_id,
version_full,
status
from dba_registry
order by comp_id;
COMP_ID VERSION_FULL STATUS
---------- --------------- ---------------
CATALOG 19.28.0.0.0 VALID
CATPROC 19.28.0.0.0 VALID
OWM 19.28.0.0.0 VALID
RAC 19.28.0.0.0 OPTION OFF
XDB 19.28.0.0.0 VALID
Conclusion
Finaly in few simple steps, we have patching our database. The AutoUpgrade utility is a very powerful tool, easy to use and manage.
I hope this blog help you to understand how AutoUpgrade works.
And I will encourage you to be familiar with this wonderful tool!
In Part II, I will show you some advanced patching that AutoUpgrade can handle!
See you soon!