Oracle RAC database upgrade from 12c to 19c DBUA

Introduction

In this article, I will show a detailed step-by-step guide of an Oracle RAC database upgrade from 12c to 19c using the DBUA tool.

Oracle RAC database upgrade using DBUA

We will perform the Oracle RAC database upgrade in 2 parts.

1) PRECHECK

2) UPGRADE

PRECHECK

Precheck is the first step in the Oracle RAC database upgrade.

Step 1) Check the database status

[oracle@lab1 ~]$ srvctl status database -d UATDB
Instance UATDB1 is running on node lab1
Instance UATDB2 is running on node lab2

Step 2) Spfile and pfile backup

SQL> create pfile='/tmp/initUATDB1.ora' from spfile;

File created.

Step 3) Database Archive Log mode

Note: – Before performing the Oracle RAC database upgrade, putting the database in Archive log is one of the mandatory steps.

SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Current log sequence           2

We can check from the above output Database is in No Archive log mode. First, we need to change the IT mode from No Archive to Archive log mode.

Step 4) Putting the Database in Archive Log Mode

Note: – Before performing the Oracle RAC database upgrade, putting the database in Archive log is one of the mandatory steps.

Output

[oracle@lab1 ~]$ srvctl stop database -d UATDB

[oracle@lab1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Thu Aug 28 16:46:39 2025

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 2667577344 bytes
Fixed Size                  8624264 bytes
Variable Size             754976632 bytes
Database Buffers         1895825408 bytes
Redo Buffers                8151040 bytes
Database mounted.


SQL> alter database archivelog;

Database altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Next log sequence to archive   2
Current log sequence           2


SQL> shut immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.


[oracle@lab1 ~]$ srvctl status database -d UATDB
Instance UATDB1 is not running on node lab1
Instance UATDB2 is not running on node lab2

[oracle@lab1 ~]$ srvctl start database -d UATDB

[oracle@lab1 ~]$ srvctl status database -d UATDB
Instance UATDB1 is running on node lab1
Instance UATDB2 is running on node lab2

Step 5) Run Oracle prechecks scripts

Download Preupgrade.jar file from MOS 884522.1

Once downloaded unzip it in below path of 19c.

Path : - /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin

[oracle@lab1 u01]$ unzip preupgrade_19_cbuild_13_lf.zip -d /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin

Archive:  preupgrade_19_cbuild_13_lf.zip
replace /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/preupgrade_package.sql? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
  inflating: /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/preupgrade_package.sql
  inflating: /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/preupgrade_driver.sql
  inflating: /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/dbms_registry_extended.sql
  inflating: /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/parameters.properties
  inflating: /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/preupgrade_messages.properties
  inflating: /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/components.properties
  inflating: /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/preupgrade.jar

Command : - /u01/app/oracle/product/19.0.0.0/dbhome_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/preupgrade.jar TERMINAL TEXT

[oracle@lab1 ~]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/preupgrade.jar TERMINAL TEXT
Report generated by Oracle Database Pre-Upgrade Information Tool Version
19.0.0.0.0 Build: 13 on 2025-08-28T16:58:05

Upgrade-To version: 19.0.0.0.0

=======================================
Status of the database prior to upgrade
=======================================
      Database Name:  UATDB
     Container Name:  UATDB
       Container ID:  0
            Version:  12.2.0.1.0
     DB Patch Level:  No Patch Bundle applied
         Compatible:  12.2.0
          Blocksize:  8192
           Platform:  Linux x86 64-bit
      Timezone File:  26
  Database log mode:  ARCHIVELOG
           Readonly:  FALSE
            Edition:  EE

  Oracle Component                       Upgrade Action    Current Status
  ----------------                       --------------    --------------
  Oracle Server                          [to be upgraded]  VALID
  JServer JAVA Virtual Machine           [to be upgraded]  VALID
  Oracle XDK for Java                    [to be upgraded]  VALID
  Real Application Clusters              [to be upgraded]  VALID
  Oracle Workspace Manager               [to be upgraded]  VALID
  OLAP Analytic Workspace                [to be upgraded]  VALID
  Oracle Label Security                  [to be upgraded]  VALID
  Oracle Database Vault                  [to be upgraded]  VALID
  Oracle Text                            [to be upgraded]  VALID
  Oracle XML Database                    [to be upgraded]  VALID
  Oracle Java Packages                   [to be upgraded]  VALID
  Oracle Multimedia                      [to be upgraded]  VALID
  Oracle Spatial                         [to be upgraded]  VALID
  Oracle OLAP API                        [to be upgraded]  VALID

==============
BEFORE UPGRADE
==============

  REQUIRED ACTIONS
  ================
  None

  RECOMMENDED ACTIONS
  ===================
  1.  (AUTOFIXUP) Gather stale data dictionary statistics prior to database
      upgrade in off-peak time using:

        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;

      Dictionary statistics do not exist or are stale (not up-to-date).

      Dictionary statistics help the Oracle optimizer find efficient SQL
      execution plans and are essential for proper upgrade timing. Oracle
      recommends gathering dictionary statistics in the last 24 hours before
      database upgrade.

      For information on managing optimizer statistics, refer to the 12.2.0.1
      Oracle Database SQL Tuning Guide.

  2.  (AUTOFIXUP) Gather statistics on fixed objects prior to the upgrade using
      the command:

        EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

      None of the fixed object tables have had stats collected.

      Gathering statistics on fixed objects, if none have been gathered yet, is
      recommended prior to upgrading.

      For information on managing optimizer statistics, refer to the 12.2.0.1
      Oracle Database SQL Tuning Guide.

  INFORMATION ONLY
  ================
  3.  Here are ALL the components in this database registry:

      Component Current     Current     Original    Previous    Component
      CID       Version     Status      Version     Version     Schema
      --------- ----------- ----------- ----------- ----------- -----------
      APS       12.2.0.1.0  VALID                               SYS
      CATALOG   12.2.0.1.0  VALID                               SYS
      CATJAVA   12.2.0.1.0  VALID                               SYS
      CATPROC   12.2.0.1.0  VALID                               SYS
      CONTEXT   12.2.0.1.0  VALID                               CTXSYS
      DV        12.2.0.1.0  VALID                               DVSYS
      JAVAVM    12.2.0.1.0  VALID                               SYS
      OLS       12.2.0.1.0  VALID                               LBACSYS
      ORDIM     12.2.0.1.0  VALID                               ORDSYS
      OWM       12.2.0.1.0  VALID                               WMSYS
      RAC       12.2.0.1.0  VALID                               SYS
      SDO       12.2.0.1.0  VALID                               MDSYS
      XDB       12.2.0.1.0  VALID                               XDB
      XML       12.2.0.1.0  VALID                               SYS
      XOQ       12.2.0.1.0  VALID                               OLAPSYS

      Review the information before upgrading.

  4.  Check the Oracle Backup and Recovery User's Guide for information on how
      to manage an RMAN recovery catalog schema.

      If you are using a version of the recovery catalog schema that is older
      than that required by the RMAN client version, then you must upgrade the
      catalog schema.

      It is good practice to have the catalog schema the same or higher version
      than the RMAN client version you are using.

  5.  Here is a count of invalid objects by Oracle-maintained users:

      Oracle-Maintained User Name                 Number of INVALID Objects
      ---------------------------                 -------------------------
      None                                        None

      Review the information before upgrading.

  6.  Here is a count of invalid objects by Application users:

      Application User Name                       Number of INVALID Objects
      ---------------------------                 -------------------------
      None                                        None

      Review the information before upgrading.

  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database UATDB
  which are identified above as BEFORE UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following

    SQL>@/u01/app/oracle/cfgtoollogs/UATDB/preupgrade/preupgrade_fixups.sql

=============
AFTER UPGRADE
=============

  REQUIRED ACTIONS
  ================
  None

  RECOMMENDED ACTIONS
  ===================
  7.  Upgrade the database time zone file using the DBMS_DST package.

      The database is using time zone file version 26 and the target 19 release
      ships with time zone file version 32.

      Oracle recommends upgrading to the desired (latest) version of the time
      zone file.  For more information, refer to "Upgrading the Time Zone File
      and Timestamp with Time Zone Data" in the 19 Oracle Database
      Globalization Support Guide.

  8.  (AUTOFIXUP) Gather dictionary statistics after the upgrade using the
      command:

        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;

      Oracle recommends gathering dictionary statistics after upgrade.

      Dictionary statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans. After a database
      upgrade, statistics need to be re-gathered as there can now be tables
      that have significantly changed during the upgrade or new tables that do
      not have statistics gathered yet.

  9.  Gather statistics on fixed objects after the upgrade and when there is a
      representative workload on the system using the command:

        EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

      This recommendation is given for all preupgrade runs.

      Fixed object statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans.  Those
      statistics are specific to the Oracle Database release that generates
      them, and can be stale upon database upgrade.

      For information on managing optimizer statistics, refer to the 12.2.0.1
      Oracle Database SQL Tuning Guide.

  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database UATDB
  which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following

    SQL>@/u01/app/oracle/cfgtoollogs/UATDB/preupgrade/postupgrade_fixups.sql

UPGRADE

The next step is the Oracle RAC database upgrade using the DBUA method.

Step 1) Go to the ORACLE_HOME/bin location of 19c and execute the dbua utility.

[oracle@lab1 ~]$ cd /u01/app/oracle/product/19.0.0.0/dbhome_1/bin

./dbua

Step 2) Select the database that you want to upgrade and proceed with the next step.

Oracle RAC database upgrade using DBUA

Step 3) Check out the prerequisites details and proceed with the next steps.

Oracle RAC database upgrade

Step 4) Select the Upgrade options below and proceed with the next step.

Oracle RAC database upgrade

Step 5) Select the recovery options as per your requirement and proceed with the next step.

Step 6) If you have configured the enterprise manager, then select the option below otherwise, uncheck it and proceed with the next step.

Oracle RAC database upgrade

Step 7) Check the summary part.

Oracle RAC database upgrade
Oracle RAC database upgrade

Step 8) DB Upgrade has been completed successfully.

Oracle RAC database upgrade
Oracle RAC database upgrade
Oracle RAC database upgrade
[oracle@lab1 bin]$ ./dbua
Logs directory:  /u01/app/oracle/cfgtoollogs/dbua/upgrade2025-08-28_05-17-24PM
Database upgrade has been completed successfully, and the database is ready to use.

Note: – Now you can run the postfixup.sql script and you will see all the post steps have been completed by DBUA itself.

Step 9) Execute the postfixup.sql script

[oracle@lab1 preupgrade]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Aug 28 20:17:17 2025
Version 19.27.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.27.0.0.0

SQL> @postupgrade_fixups.sql

Session altered.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Package created.

No errors.

Package body created.


PL/SQL procedure successfully completed.

No errors.





Package created.

No errors.

Package body created.

No errors.
Executing Oracle POST-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 19.0.0.0.0 Build: 13
Generated on:            2025-08-28 16:58:04

For Source Database:     UATDB
Source Database Version: 12.2.0.1.0
For Upgrade to Version:  19.0.0.0.0

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    7.  old_time_zones_exist      YES         None.
    8.  post_dictionary           YES         None.
    9.  post_fixed_objects        NO          Informational only.
                                              Further action is optional.

The fixup scripts have been run and resolved what they can. However,
there are still issues originally identified by the preupgrade that
have not been remedied and are still present in the database.
Depending on the severity of the specific issue, and the nature of
the issue itself, that could mean that your database upgrade is not
fully complete.  To resolve the outstanding issues, start by reviewing
the postupgrade_fixups.sql and searching it for the name of
the failed CHECK NAME or Preupgrade Action Number listed above.
There you will find the original corresponding diagnostic message
from the preupgrade which explains in more detail what still needs
to be done.

PL/SQL procedure successfully completed.

From this point, you can hand over the database to the application team for the sanity checks as we have completed our Oracle RAC database upgrade part, and if all looks good from the app team, then you can change the compatibility parameter from 12.2.0 to 19.0.0

Note: – DBUA Method has some also one drawbacks that in most organisations, due to the security issues, they don't allow to use of the GUI (Graphical User Interface) screen due to which they again need to follow the Manual steps, but hang on oracle comes up with a new utility called AUTOUPGRADE which is also a fully automted, but runs through CLI (Command Line Interface). So it basically solves the problem of both the DBA and the Application Team or the Clients.

Conclusion

Finally, we have completed our Oracle RAC database upgrade from 12c to 19c using the DBUA method.

Note: – If you want to practice this whole activity in your home lab, then you'll need a platform to perform the installation. To set that up, you first need to download and install Oracle VirtualBox, followed by the operating system, the Oracle binary software, and finally, create the database.

If you enjoyed the article, please leave a comment and share it with your friends. Also, let me know which Oracle and MySQL topics you'd like to see covered in future articles.

Scroll to Top