Hi everyone, hope you’re doing well.

This is one more post in a series of blog posts exploring the potential of AutoUpgrade-Composer, as we may have dozens of scenarios. You can read all blog posts about AutoUpgrade-Composer here: https://viniciusdba.com.br/autoupgrade-composer-posts/

In this blog post, we’ll perform a straightforward operation, a regular upgrade from a 12.2.0.1 DB to 19.27. 

I’m currently have this DB running under my Lab in OCI (Thank you Oracle ACE Program!), I created the DB using the default components – no customization here:

  • DB Name: TST2
  • Version: 12.2.0.1.240716
  • Source Home: /u01/app/oracle/product/12.2.0.1.240716/dbhome_1
  • Single Instance DB
  • Non-CDB
  • Components:
    • Oracle Database Catalog Views
    • Oracle Database Packages and Types
    • JServer JAVA Virtual Machin
    • Oracle XDK
    • Oracle Database Java Packages
    • OLAP Analytic Workspace
    • Oracle XML Database
    • Oracle Workspace Manager
    • Oracle Text
    • Oracle Multimedia
    • Spatial
    • Oracle OLAP API
    • Oracle Label Security
    • Oracle Database Vault
  • Target RU: 19.27
  • Target Oracle Home: /u01/app/oracle/product/19.27/dbhome_1

The Upgrade mode for AutoUpgrade does not create the Oracle Home for us, if you need to create the Target Home, plan to do that in advance. You also can use AutoUpgrade to perform the installation of your Oracle Home and you can check this blog post how to create a valid configuration file for AutoUpgrade:

AutoUpgrade-Composer: Installing a New Oracle Home with Create Home Mode

So, first we’ll access AutoUpgrade-Composer: https://viniciusdba.com.br/autoupgrade-composer

The Upgrade Database is one of the operation types. Select Upgrade Database:

Once we select Upgrade Database, in the Upgrade Type, select Regular Upgrade:

In Basic Information, fill in with the required values:

  • SID: TST2
  • Source Home: /u01/app/oracle/product/12.2.0.1.240716/dbhome_1
  • Target Home: /u01/app/oracle/product/19.27/dbhome_1

Our Database is running in ARCHIVELOG mode. So, we will keep the Restoration option enabled for GRP, this means that a Guarantee Restore Point will be created before the Upgrade operation, so, in case of any issues, we don’t compromise the recoverability of the database. But, we would like to drop the Guarantee Restore Point once the Upgrade is completed. Plus, this is not a RAC database as we mentioned earlier, this is a Single Instance database. So, under Additional Options, let’s:

  • Enable the option: Drop GRP After Upgrade
  • Disable the option: Proactive Fixups

Great, let’s check our Generated Config:

The Generated Config sounds OK. You can copy the content to clipboard by clicking in the button Copy to Clipboard or you can download the file by clicking in the button Download Config File.

Now, scroll down until section Running Autopgrade to get the instructions on how to run AutoUpgrade to Upgrade your DB:

Let’s proceed.

The DB TST2 must be up and running before we continue.

Let’s double check some info about our DB:

SQL> select name,cdb from v$database;

NAME      CDB
--------- ---
TST2      NO

SQL> select comp_name,version,status from dba_registry;

COMP_NAME                                                    VERSION                        STATUS
------------------------------------------------------------ ------------------------------ --------------------------------------------
Oracle Database Catalog Views                                12.2.0.1.0                     VALID
Oracle Database Packages and Types                           12.2.0.1.0                     VALID
JServer JAVA Virtual Machine                                 12.2.0.1.0                     VALID
Oracle XDK                                                   12.2.0.1.0                     VALID
Oracle Database Java Packages                                12.2.0.1.0                     VALID
OLAP Analytic Workspace                                      12.2.0.1.0                     VALID
Oracle Real Application Clusters                             12.2.0.1.0                     OPTION OFF
Oracle XML Database                                          12.2.0.1.0                     VALID
Oracle Workspace Manager                                     12.2.0.1.0                     VALID
Oracle Text                                                  12.2.0.1.0                     VALID
Oracle Multimedia                                            12.2.0.1.0                     VALID
Spatial                                                      12.2.0.1.0                     VALID
Oracle OLAP API                                              12.2.0.1.0                     VALID
Oracle Label Security                                        12.2.0.1.0                     VALID
Oracle Database Vault                                        12.2.0.1.0                     VALID

I saved my configuration file as upg_TST2.cfg:

[oracle@upgrade-lab ~]$ cat upg_TST2.cfg
# Created by AutoUpgrade Composer
# Upgrade, UpgType: regular

global.global_log_dir=/home/oracle/autoupgrade/log

upg1.sid=TST2
upg1.log_dir=/home/oracle/autoupgrade/TST2_Upgrade/log
upg1.source_home=/u01/app/oracle/product/12.2.0.1.240716/dbhome_1
upg1.target_home=/u01/app/oracle/product/19.27/dbhome_1
upg1.restoration=YES
upg1.drop_grp_after_upgrade=YES

Executing AutoUpgrade:

[oracle@upgradelab ~]$ java -jar autoupgrade.jar -config /home/oracle/upg_TST2.cfg -mode deploy
AutoUpgrade 25.4.250730 launched with default internal options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
Type 'help' to list console commands
upg> 
upg> 
upg> lsj -a 7
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 100|   TST2|PRECHECKS|EXECUTING|RUNNING|  20:29:20| 0s ago|Executing Checks|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

The command lsj is running every 10 seconds. PRESS ENTER TO EXIT

upg> lsj -a 10
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 100|   TST2|PRECHECKS|EXECUTING|RUNNING|  20:29:20| 7s ago|Executing Checks|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

Let’s keep the command to list the jobs running automatically every 10 seconds:

upg> lsj -a 10
+----+-------+-----------+---------+-------+----------+-------+---------------------+
|Job#|DB_NAME|      STAGE|OPERATION| STATUS|START_TIME|UPDATED|              MESSAGE|
+----+-------+-----------+---------+-------+----------+-------+---------------------+
| 100|   TST2|POSTUPGRADE|EXECUTING|RUNNING|  20:29:20|52s ago|Creating final SPFILE|
+----+-------+-----------+---------+-------+----------+-------+---------------------+
Total jobs 1

The command lsj is running every 10 seconds. PRESS ENTER TO EXIT
+----+-------+-----------+---------+-------+----------+-------+---------------------+
|Job#|DB_NAME|      STAGE|OPERATION| STATUS|START_TIME|UPDATED|              MESSAGE|
+----+-------+-----------+---------+-------+----------+-------+---------------------+
| 100|   TST2|POSTUPGRADE|EXECUTING|RUNNING|  20:29:20|62s ago|Creating final SPFILE|
+----+-------+-----------+---------+-------+----------+-------+---------------------+
Total jobs 1

The command lsj is running every 10 seconds. PRESS ENTER TO EXIT
+----+-------+-----------+---------+-------+----------+-------+----------+
|Job#|DB_NAME|      STAGE|OPERATION| STATUS|START_TIME|UPDATED|   MESSAGE|
+----+-------+-----------+---------+-------+----------+-------+----------+
| 100|   TST2|POSTUPGRADE|EXECUTING|RUNNING|  20:29:20| 8s ago|Restarting|
+----+-------+-----------+---------+-------+----------+-------+----------+
Total jobs 1

The command lsj is running every 10 seconds. PRESS ENTER TO EXIT

This is the final output of AutoUpgrade:

The command lsj is running every 10 seconds. PRESS ENTER TO EXIT
Job 100 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

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


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

Let’s check the info on DB after the upgrade:

SQL> select comp_name,version,status from dba_registry;

COMP_NAME                                                    VERSION                        STATUS
------------------------------------------------------------ ------------------------------ --------------------------------------------
Oracle Database Catalog Views                                19.0.0.0.0                     VALID
Oracle Database Packages and Types                           19.0.0.0.0                     VALID
JServer JAVA Virtual Machine                                 19.0.0.0.0                     VALID
Oracle XDK                                                   19.0.0.0.0                     VALID
Oracle Database Java Packages                                19.0.0.0.0                     VALID
OLAP Analytic Workspace                                      19.0.0.0.0                     VALID
Oracle Real Application Clusters                             19.0.0.0.0                     OPTION OFF
Oracle XML Database                                          19.0.0.0.0                     VALID
Oracle Workspace Manager                                     19.0.0.0.0                     VALID
Oracle Text                                                  19.0.0.0.0                     VALID
Oracle Multimedia                                            19.0.0.0.0                     VALID
Spatial                                                      19.0.0.0.0                     VALID
Oracle OLAP API                                              19.0.0.0.0                     VALID
Oracle Label Security                                        19.0.0.0.0                     VALID
Oracle Database Vault                                        19.0.0.0.0                     VALID

Great!

As we saw here, the upgrade is a pretty straightforward operation with AutoUpgrade! And you can use AutoUpgrade-Composer to help you building your configuration file!

Hope it helps!

Peace!

Vinicius

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.