Skip to main content

Oracle Database Upgrade 12c to 19c using autoupgrade.jar

Oracle Database upgrade from 12c to 19c using autoupgrade.jar

Introduction

This is the third post in our four-part series on upgrading Oracle Database from 12c to 19c. We've already covered the GUI-driven Upgrade Using DBUA and the Upgrade Using Manual Method. This time we'll use autoupgrade.jar, Oracle's own command-line tool that drives the same underlying upgrade through a single config file, which makes it a natural fit for scripting and batch upgrades of multiple databases.

Methods of Upgrade

As a reminder, Oracle supports four approaches for this upgrade:

  1. Using DBUA (Database Upgrade Assistant)
  2. Using the manual method
  3. Using autoupgrade.jar
  4. Using RMAN and catctl.pl

Unlike DBUA, autoupgrade.jar needs no GUI or X11 forwarding, and unlike the manual method, it doesn't require running each catalog step by hand. It reads a config file describing the source and target homes, then works through prechecks, fixups, and the catalog upgrade itself, with a console you can query for live status.

Prerequisites

  • 12c binary installed with the database.
  • 19c binary installed without a database.
  • Java version 8 or later.
  • The latest autoupgrade.jar file, downloadable from My Oracle Support note 2485457.1.
  • Sufficient disk space for tablespace and archive growth.
  • Minimum 6 hours of downtime for a production database.

Environment Used in This Guide

Source Database
Hostname devdb.oraeasy.com
Database Name DEVDB
Database Version 12c (12.2.0.1)
CDB/PDB Yes, single instance
Oracle Home /u01/app/oracle/product/12c/db_1
Datafile Location /u01/app/oracle/oradata/devdb

Target Database
Database Version 19c (19.3.0.0.0)
Oracle Home /u01/app/oracle/product/19c/db_home

Step 1: Take a Precheck at the Source

Before touching anything, create a test table so the data can be validated after the upgrade completes, then capture baseline numbers for tablespace usage, invalid objects, and registry component status.

Create a Test Table for Post-Upgrade Validation


SQL> show user
USER is "TEST"
SQL>
SQL> def
DEFINE _DATE           = "31-JUL-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "DEVDBPDB" (CHAR)
DEFINE _USER           = "TEST" (CHAR)
DEFINE _PRIVILEGE      = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1202000100" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production" (CHAR)
DEFINE _O_RELEASE      = "1202000100" (CHAR)
SQL>
SQL> CREATE TABLE COMPANY (EMP_ID INT,NAME VARCHAR(255), COMPANY VARCHAR(255));

Table created.

SQL> INSERT INTO COMPANY VALUES (101,'Yash','WIPRO');

1 row created.

SQL> INSERT INTO COMPANY VALUES (102,'Vijay','AIRTEL');

1 row created.

SQL> INSERT INTO COMPANY VALUES (103,'Riya','TCS');

1 row created.

SQL> commit;

Commit complete.

SQL> select count(*) from COMPANY;

  COUNT(*)
----------
         3

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

Check Tablespace Usage, Invalid Objects, and Registry Components


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
         
SQL> set lines 200 pages 1000
SQL> select t.tablespace,  t.totalspace as " Totalspace(MB)",
round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
nvl(fs.freespace,0) as "Freespace(MB)",
round(((t.totalspace-nvl(fs.freespace,0))/t.totalspace)*100,2) as "%Used",
round((nvl(fs.freespace,0)/t.totalspace)*100,2) as "% Free"
from
(select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
from dba_data_files d
group by d.tablespace_name) t,
(select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
from dba_free_space f
group by f.tablespace_name) fs
where t.tablespace=fs.tablespace (+)
order by "% Free"; 

TABLESPACE                      Totalspace(MB) Used Space(MB) Freespace(MB)      %Used     % Free
------------------------------ --------------- -------------- ------------- ---------- ----------
SYSTEM                                     800            796             4       99.5         .5
UNDOTBS1                                    70             66             4      94.29       5.71
SYSAUX                                     470            442            28      94.04       5.96
USERS                                        5              1             4         20         80

SQL> select count(*) from dba_objects where status='INVALID';

  COUNT(*)
----------
         0
         
SQL> col COMP_ID for a10
SQL> col COMP_NAME for a40
SQL> col VERSION for a15
SQL> set lines 180
SQL> set pages 9998
SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;

COMP_ID    COMP_NAME                                VERSION         STATUS
---------- ---------------------------------------- --------------- ---------------
CATALOG    Oracle Database Catalog Views            12.2.0.1.0      VALID
CATPROC    Oracle Database Packages and Types       12.2.0.1.0      VALID
JAVAVM     JServer JAVA Virtual Machine             12.2.0.1.0      VALID
XML        Oracle XDK                               12.2.0.1.0      VALID
CATJAVA    Oracle Database Java Packages            12.2.0.1.0      VALID
APS        OLAP Analytic Workspace                  12.2.0.1.0      VALID
RAC        Oracle Real Application Clusters         12.2.0.1.0      OPTION OFF
XDB        Oracle XML Database                      12.2.0.1.0      VALID
OWM        Oracle Workspace Manager                 12.2.0.1.0      VALID
CONTEXT    Oracle Text                              12.2.0.1.0      VALID
ORDIM      Oracle Multimedia                        12.2.0.1.0      VALID
SDO        Spatial                                  12.2.0.1.0      VALID
XOQ        Oracle OLAP API                          12.2.0.1.0      VALID
OLS        Oracle Label Security                    12.2.0.1.0      VALID
DV         Oracle Database Vault                    12.2.0.1.0      VALID

15 rows selected.

SQL>

For the PDB:
SQL> alter session set container=DEVDBPDB; Session altered. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> set lines 200 pages 1000 SQL> select t.tablespace, t.totalspace as " Totalspace(MB)", round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)", nvl(fs.freespace,0) as "Freespace(MB)", round(((t.totalspace-nvl(fs.freespace,0))/t.totalspace)*100,2) as "%Used", round((nvl(fs.freespace,0)/t.totalspace)*100,2) as "% Free" from (select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace from dba_data_files d group by d.tablespace_name) t, (select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace from dba_free_space f group by f.tablespace_name) fs where t.tablespace=fs.tablespace (+) order by "% Free"; TABLESPACE Totalspace(MB) Used Space(MB) Freespace(MB) %Used % Free ------------------------------ --------------- -------------- ------------- ---------- ---------- SYSTEM 250 246 4 98.4 1.6 SYSAUX 360 338 22 93.89 6.11 UNDOTBS1 100 48 52 48 52 USERS 5 1 4 20 80 SQL> select count(*) from dba_objects where status='INVALID'; COUNT(*) ---------- 0 SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry; COMP_ID COMP_NAME VERSION STATUS ---------- ---------------------------------------- --------------- ----------------- CATALOG Oracle Database Catalog Views 12.2.0.1.0 VALID CATPROC Oracle Database Packages and Types 12.2.0.1.0 VALID JAVAVM JServer JAVA Virtual Machine 12.2.0.1.0 VALID XML Oracle XDK 12.2.0.1.0 VALID CATJAVA Oracle Database Java Packages 12.2.0.1.0 VALID APS OLAP Analytic Workspace 12.2.0.1.0 VALID RAC Oracle Real Application Clusters 12.2.0.1.0 OPTION OFF XDB Oracle XML Database 12.2.0.1.0 VALID OWM Oracle Workspace Manager 12.2.0.1.0 VALID CONTEXT Oracle Text 12.2.0.1.0 VALID ORDIM Oracle Multimedia 12.2.0.1.0 VALID SDO Spatial 12.2.0.1.0 VALID XOQ Oracle OLAP API 12.2.0.1.0 VALID OLS Oracle Label Security 12.2.0.1.0 VALID DV Oracle Database Vault 12.2.0.1.0 VALID 15 rows selected.

Step 2: Enable Flashback and Size the FRA

autoupgrade.jar creates its own guaranteed restore point (GRP) automatically during the upgrade, but that requires the database to already be in ARCHIVELOG mode with flashback enabled and enough Fast Recovery Area space to hold it.


SQL>  archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     10
Next log sequence to archive   12
Current log sequence           12
SQL>
SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
NO
 
SQL> alter database flashback on;

Database altered.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
YES

SQL> select name,open_mode,log_mode from v$database;

NAME      OPEN_MODE            LOG_MODE
--------- -------------------- ------------
DEVDB     READ WRITE           ARCHIVELOG

SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      12.2.0
noncdb_compatible                    boolean     FALSE

SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_
                                                 area/devdb
db_recovery_file_dest_size           big integer 5G
db_unrecoverable_scn_tracking        boolean     TRUE
recovery_parallelism                 integer     0
remote_recovery_file_dest            string
SQL>
SQL> alter system set db_recovery_file_dest_size=15G;

System altered.

SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_
                                                 area/devdb
db_recovery_file_dest_size           big integer 15G
db_unrecoverable_scn_tracking        boolean     TRUE
recovery_parallelism                 integer     0
remote_recovery_file_dest            string
SQL>

Step 3: Check the Java Version and Update autoupgrade.jar

autoupgrade.jar needs Java 8 or later, and the copy that ships inside the 19c home is usually outdated. Back up the bundled jar and replace it with the latest version downloaded from My Oracle Support.


[oracle@devdb ~]$ java -version
openjdk version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-b14)
OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
[oracle@devdb ~]$
[oracle@devdb ~]$
[oracle@devdb ~]$ /u01/app/oracle/product/19c/db_home/jdk/bin/java -jar /u01/app/oracle/product/19c/db_home/rdbms/admin/autoupgrade.jar -version
build.version 20190207
build.date 2019/02/07 12:35:56
build.label RDBMS_PT.AUTOUPGRADE_LINUX.X64_190205.1800

[oracle@devdb ~]$ cd /u01/app/oracle/product/19c/db_home/rdbms/admin
[oracle@devdb admin]$ ls -lrth autoupgrade.jar
-rw-r--r--. 1 oracle oinstall 3.3M Feb  9  2019 autoupgrade.jar
[oracle@devdb admin]$
[oracle@devdb admin]$ mv autoupgrade.jar autoupgrade_bkp.jar
[oracle@devdb admin]$ pwd
/u01/app/oracle/product/19c/db_home/rdbms/admin
[oracle@devdb admin]$ ls -lrth autoupgrade*
-rw-r--r--. 1 oracle oinstall 3.3M Feb  9  2019 autoupgrade_bkp.jar
-rw-r--r--. 1 oracle oinstall 2.3M Jul 31 11:55 autoupgrade.jar
[oracle@devdb admin]$ /u01/app/oracle/product/19c/db_home/jdk/bin/java -jar /u01/app/oracle/product/19c/db_home/rdbms/admin/autoupgrade.jar -version
build.hash e84c9c2
build.version 19.10.0
build.date 2020/10/23 10:36:46
build.max_target_version 19
build.supported_target_versions 12.2,18,19
build.type production

[oracle@devdb admin]$

Step 4: Create and Edit the Config File

autoupgrade.jar reads a single config file describing the source and target homes, the SID, and a handful of upgrade options. Generate a sample, then edit it to match this environment.


[oracle@devdb ~]$ mkdir upgrade19c
[oracle@devdb ~]$ cd upgrade19c/
[oracle@devdb upgrade19c]$ pwd
/home/oracle/upgrade19c
[oracle@devdb upgrade19c]$
[oracle@devdb upgrade19c]$ /u01/app/oracle/product/19c/db_home/jdk/bin/java -jar /u01/app/oracle/product/19c/db_home/rdbms/admin/autoupgrade.jar -create_sample_file config
Created sample configuration file /home/oracle/upgrade19c/sample_config.cfg
[oracle@devdb upgrade19c]$
[oracle@devdb upgrade19c]$ cp sample_config.cfg devdb_upg.cfg
[oracle@devdb upgrade19c]$ vi devdb_upg.cfg
[oracle@devdb upgrade19c]$ cat devdb_upg.cfg
#
# sample config file
#
# build version 19.10.0
# build date    2020/10/23 10:36:46
#
#
# Global configurations
#
# This directory will include the following
#   (1) AutoUpgrade's global directory
#   (2) Any logs, not directly tied to a job
#   (3) Config files
#   (4) progress.json and status.json
global.autoupg_log_dir=/home/oracle/upgrade19c/upg_logs

#
# Database number 1
#
upg1.dbname=devdb
upg1.start_time=NOW
upg1.source_home=/u01/app/oracle/product/12c/db_1
upg1.target_home=/u01/app/oracle/product/19c/db_home
upg1.sid=devdb
upg1.log_dir=/home/oracle/upgrade19c/upg_logs/devdb
upg1.upgrade_node=devdb.oraeasy.com
upg1.target_version=19
upg1.run_utlrp=yes
upg1.timezone_upg=yes
[oracle@devdb upgrade19c]$

Step 5: Run autoupgrade.jar in Analyze Mode

Analyze mode runs the same prechecks DBUA and the manual preupgrade.jar would run, but without touching the database, which makes it a safe way to confirm the upgrade is likely to go smoothly before committing to it.


[oracle@devdb upgrade19c]$ export ORACLE_HOME=/u01/app/oracle/product/19c/db_home
[oracle@devdb upgrade19c]$ echo $ORACLE_HOME
/u01/app/oracle/product/19c/db_home
[oracle@devdb upgrade19c]$ ls
devdb_upg.cfg  sample_config.cfg
[oracle@devdb upgrade19c]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config devdb_upg.cfg -mode analyze
AutoUpgrade tool launched with default options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be analyzed
Type 'help' to list console commands
upg>
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+----------------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|                     MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+----------------------------+
| 100|  devdb|PRECHECKS|PREPARING|RUNNING|25/07/31 12:10|12:10:33|Loading database information|
+----+-------+---------+---------+-------+--------------+--------+----------------------------+
Total jobs 1

upg>
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+----------------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|                     MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+----------------------------+
| 100|  devdb|PRECHECKS|PREPARING|RUNNING|25/07/31 12:10|12:10:33|Loading database information|
+----+-------+---------+---------+-------+--------------+--------+----------------------------+
Total jobs 1

upg>
upg> Job 100 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished successfully     [1]
Jobs failed                    [0]
Jobs pending                   [0]
------------- JOBS FINISHED SUCCESSFULLY -------------
Job 100 for devdb

[oracle@devdb upgrade19c]$

Detailed results are available at the log location defined in the config file.

Step 6: Run autoupgrade.jar in Deploy Mode

Deploy mode is what actually performs the upgrade: prechecks, fixups, the catalog upgrade, and timezone update, all driven from the same config file used for the analyze run.


[oracle@devdb upgrade19c]$ export ORACLE_HOME=/u01/app/oracle/product/19c/db_home
[oracle@devdb upgrade19c]$
[oracle@devdb upgrade19c]$ echo $ORACLE_HOME
/u01/app/oracle/product/19c/db_home
[oracle@devdb upgrade19c]$
[oracle@devdb upgrade19c]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config devdb_upg.cfg -mode DEPLOY
AutoUpgrade tool launched with default options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be processed
Type 'help' to list console commands
upg>
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+----------------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|                     MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+----------------------------+
| 101|  devdb|PRECHECKS|PREPARING|RUNNING|25/07/31 12:28|12:28:27|Loading database information|
+----+-------+---------+---------+-------+--------------+--------+----------------------------+
Total jobs 1

upg>
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+-------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|      MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+-------------+
| 101|  devdb|PREFIXUPS|EXECUTING|RUNNING|25/07/31 12:28|12:29:22|Remaining 6/6|
+----+-------+---------+---------+-------+--------------+--------+-------------+
Total jobs 1

Step 7: Monitor the Job Status

The status command gives a live breakdown of which stage the upgrade is in, how long each stage took, where the logs live, and per-container progress percentages, which is useful for tracking a long-running upgrade without tailing raw log files.


upg>

upg> status -job 101
Progress
-----------------------------------
Start time:      25/07/31 12:28
Elapsed (min):   19
End time:        N/A
Last update:     2025-07-31T12:47:28.458
Stage:           DBUPGRADE
Operation:       EXECUTING
Status:          RUNNING
Pending stages:  4
Stage summary:
    SETUP             <1 min
    GRP               <1 min
    PREUPGRADE        <1 min
    PRECHECKS         <1 min
    PREFIXUPS         4 min
    DRAIN             <1 min
    DBUPGRADE         13 min (IN PROGRESS)

Job Logs Locations
-----------------------------------
Logs Base:    /home/oracle/upgrade19c/upg_logs/devdb/devdb
Job logs:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/101
Stage logs:   /home/oracle/upgrade19c/upg_logs/devdb/devdb/101/dbupgrade
TimeZone:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/temp

Additional information
-----------------------------------
Details:
[Upgrading] is [14%] completed for [devdb-cdb$root]
                 +---------+---------------+
                 |CONTAINER|     PERCENTAGE|
                 +---------+---------------+
                 | CDB$ROOT|  UPGRADE [14%]|
                 | PDB$SEED|UPGRADE PENDING|
                 | DEVDBPDB|UPGRADE PENDING|
                 +---------+---------------+

Error Details:
None

upg>  /
Progress
-----------------------------------
Start time:      25/07/31 12:28
Elapsed (min):   92
End time:        N/A
Last update:     2025-07-31T14:00:17.118
Stage:           DBUPGRADE
Operation:       EXECUTING
Status:          RUNNING
Pending stages:  4
Stage summary:
    SETUP             <1 min
    GRP               <1 min
    PREUPGRADE        <1 min
    PRECHECKS         <1 min
    PREFIXUPS         4 min
    DRAIN             <1 min
    DBUPGRADE         85 min (IN PROGRESS)

Job Logs Locations
-----------------------------------
Logs Base:    /home/oracle/upgrade19c/upg_logs/devdb/devdb
Job logs:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/101
Stage logs:   /home/oracle/upgrade19c/upg_logs/devdb/devdb/101/dbupgrade
TimeZone:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/temp

Additional information
-----------------------------------
Details:
[Compiling] is [88%] completed for [devdb-cdb$root] objects remaining is [347]
                 +---------+---------------+
                 |CONTAINER|     PERCENTAGE|
                 +---------+---------------+
                 | CDB$ROOT|  COMPILE [88%]|
                 | PDB$SEED|UPGRADE PENDING|
                 | DEVDBPDB|UPGRADE PENDING|
                 +---------+---------------+

Error Details:
None

upg>

upg> /
Progress
-----------------------------------
Start time:      25/07/31 12:28
Elapsed (min):   117
End time:        N/A
Last update:     2025-07-31T14:22:24.887
Stage:           DBUPGRADE
Operation:       EXECUTING
Status:          RUNNING
Pending stages:  4
Stage summary:
    SETUP             <1 min
    GRP               <1 min
    PREUPGRADE        <1 min
    PRECHECKS         <1 min
    PREFIXUPS         4 min
    DRAIN             <1 min
    DBUPGRADE         110 min (IN PROGRESS)

Job Logs Locations
-----------------------------------
Logs Base:    /home/oracle/upgrade19c/upg_logs/devdb/devdb
Job logs:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/101
Stage logs:   /home/oracle/upgrade19c/upg_logs/devdb/devdb/101/dbupgrade
TimeZone:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/temp

Additional information
-----------------------------------
Details:
[Upgrading] is [10%] completed for [devdb-devdbpdb]
                 +---------+--------------------------------------+
                 |CONTAINER|                            PERCENTAGE|
                 +---------+--------------------------------------+
                 | CDB$ROOT|SUCCESSFULLY UPGRADED [devdb-cdb$root]|
                 | PDB$SEED|                         UPGRADE [10%]|
                 | DEVDBPDB|                         UPGRADE [10%]|
                 +---------+--------------------------------------+

Error Details:
None

upg>

Step 8: Review the Completion Output

Once every container finishes, the console prints a final summary and a reminder to drop the guaranteed restore point (GRP) autoupgrade.jar created for you, once you're confident you won't need to roll back.


upg> Job 101 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished successfully     [1]
Jobs failed                    [0]
Jobs pending                   [0]
------------- JOBS FINISHED SUCCESSFULLY -------------
Job 101 for devdb

---- Drop GRP at your convenience once you consider it is no longer needed ----
Drop GRP from devdb: drop restore point AUTOUPGRADE_9212_DEVDB122010

Step 9: Bounce the Database and Run the Postcheck

A restart plus the same checks used before the upgrade confirm the time zone version, invalid object count, and registry status are all clean on 19c.


[oracle@devdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jul 31 16:20:48 2025
Version 19.3.0.0.0

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

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             654311424 bytes
Database Buffers          503316480 bytes
Redo Buffers                7643136 bytes
Database mounted.
Database opened.
SQL>

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL> SELECT version FROM v$timezone_file;

   VERSION
----------
        32

SQL> select count(1) from dba_objects where status='INVALID';

  COUNT(1)
----------
         0

SQL> col COMP_ID for a10
SQL> col COMP_NAME for a40
SQL> col VERSION for a15
SQL> set lines 180
SQL> set pages 999
SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;

COMP_ID    COMP_NAME                                VERSION         STATUS
---------- ---------------------------------------- --------------- --------------------------------------------
CATALOG    Oracle Database Catalog Views            19.0.0.0.0      VALID
CATPROC    Oracle Database Packages and Types       19.0.0.0.0      VALID
JAVAVM     JServer JAVA Virtual Machine             19.0.0.0.0      VALID
XML        Oracle XDK                               19.0.0.0.0      VALID
CATJAVA    Oracle Database Java Packages            19.0.0.0.0      VALID
APS        OLAP Analytic Workspace                  19.0.0.0.0      VALID
RAC        Oracle Real Application Clusters         19.0.0.0.0      OPTION OFF
XDB        Oracle XML Database                      19.0.0.0.0      VALID
OWM        Oracle Workspace Manager                 19.0.0.0.0      VALID
CONTEXT    Oracle Text                              19.0.0.0.0      VALID
ORDIM      Oracle Multimedia                        19.0.0.0.0      VALID
SDO        Spatial                                  19.0.0.0.0      VALID
XOQ        Oracle OLAP API                          19.0.0.0.0      VALID
OLS        Oracle Label Security                    19.0.0.0.0      VALID
DV         Oracle Database Vault                    19.0.0.0.0      VALID

15 rows selected.

SQL>

For the PDB:
SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> SELECT version FROM v$timezone_file; VERSION -------- 32 SQL> select count(1) from dba_objects where status='INVALID'; COUNT(1) ---------- 0 SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry; COMP_ID COMP_NAME VERSION STATUS ---------- ---------------------------------------- ------------------------------ -------------------------------------------- CATALOG Oracle Database Catalog Views 19.0.0.0.0 VALID CATPROC Oracle Database Packages and Types 19.0.0.0.0 VALID JAVAVM JServer JAVA Virtual Machine 19.0.0.0.0 VALID XML Oracle XDK 19.0.0.0.0 VALID CATJAVA Oracle Database Java Packages 19.0.0.0.0 VALID APS OLAP Analytic Workspace 19.0.0.0.0 VALID RAC Oracle Real Application Clusters 19.0.0.0.0 OPTION OFF XDB Oracle XML Database 19.0.0.0.0 VALID OWM Oracle Workspace Manager 19.0.0.0.0 VALID CONTEXT Oracle Text 19.0.0.0.0 VALID ORDIM Oracle Multimedia 19.0.0.0.0 VALID SDO Spatial 19.0.0.0.0 VALID XOQ Oracle OLAP API 19.0.0.0.0 VALID OLS Oracle Label Security 19.0.0.0.0 VALID DV Oracle Database Vault 19.0.0.0.0 VALID 15 rows selected.

If any registry component shows invalid, run @ORACLE_HOME/rdbms/admin/utlrp.sql to recompile it.

Step 10: Verify the Table Data

Confirm the test table created at the very start survived the upgrade with its data intact.


[oracle@devdb ~]$ sqlplus test@DEVDBPDB

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jul 31 16:25:48 2025
Version 19.3.0.0.0

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

Enter password:
Last Successful login time: Mon Jul 31 2025 10:20:09 +05:30

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

SQL> show user
USER is "TEST"
SQL>
SQL> def
DEFINE _DATE           = "31-JUL-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "DEVDBPDB" (CHAR)
DEFINE _USER           = "TEST" (CHAR)
DEFINE _PRIVILEGE      = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1202000100" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production" (CHAR)
DEFINE _O_RELEASE      = "1900000000" (CHAR)
SQL>
SQL> select count(*) from COMPANY;

  COUNT(*)
----------
         3

SQL>

Step 11: Drop the Flashback Restore Point

With the upgrade verified, the guaranteed restore point that autoupgrade.jar created automatically is no longer needed and can be dropped.


SQL> col name for a20
SQL> col GUARANTEE_FLASHBACK_DATABASE for a10
SQL> col TIME for a60
SQL> set lines 190
SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;

NAME                                     GUA TIME
---------------------------------------- --- ----------------------------------------
AUTOUPGRADE_9212_DEVDB122010             YES 31-JUL-25 12.28.27.000000000 PM

SQL>
SQL> drop restore point AUTOUPGRADE_9212_DEVDB122010;

Restore point dropped.

SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;

no rows selected

SQL>

Step 12: Update the COMPATIBLE Parameter

Raising COMPATIBLE to 19.0.0 unlocks 19c-only features, but it's a one-way change, so only do this once you're confident the upgrade is solid and you won't need to fall back to 12c.


SQL>  show parameter COMPATIBLE

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      12.2.0
noncdb_compatible                    boolean     FALSE
SQL>
SQL>  ALTER SYSTEM SET COMPATIBLE = '19.0.0' SCOPE=SPFILE;

System altered.

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

SQL> startup
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             771751936 bytes
Database Buffers          385875968 bytes
Redo Buffers                7643136 bytes
Database mounted.
Database opened.
SQL>
SQL> show parameter COMPATIBLE

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      19.0.0
noncdb_compatible                    boolean     FALSE
SQL>
SQL> select name,open_mode,version from v$database,v$instance;

NAME                 OPEN_MODE            VERSION
-------------------- -------------------- ---------------
DEVDB                READ WRITE           19.0.0.0.0

SQL>

The 12c to 19c upgrade activity has now been completed successfully using autoupgrade.jar. That covers the three upgrade methods in this series: DBUA for a guided GUI walkthrough, the manual method for full visibility into each phase, and autoupgrade.jar for a scriptable, config-driven approach that suits automating upgrades across several databases.

Thank you for reading!

I hope this content has been helpful to you. Your feedback and suggestions are always welcome. Feel free to leave a comment or reach out with any queries.

Abhishek Shrivastava

Oracle DBA with hands-on experience managing production Data Guard, RAC, GoldenGate, and APEX environments. I write practical, tested installation and troubleshooting guides based on real deployment work.

📧 Email: oraeasyy@gmail.com
🌐 Website: www.oraeasy.com

Follow Us

Comments

↑