Introduction
Oracle 19c is the Long-Term Support (LTS) release in Oracle's database roadmap, so with 12c now past its extended support window, upgrading is less optional than it used to be. Beyond staying supported, 19c brings performance and stability improvements that make the move worthwhile on its own. This is the first post in a four-part series covering the ways to get a database from 12c to 19c, starting with the most common route: DBUA.
Methods of Upgrade
Across this series, we'll cover four ways to perform the upgrade:
- Using DBUA (Database Upgrade Assistant)
- Using the manual method
- Using autoupgrade.jar
- Using RMAN and catctl.pl
DBUA is the GUI-driven option and the one most DBAs reach for first, since it handles prechecks, fixups, and the catalog upgrade through a single wizard with minimal manual intervention. This article walks through that path step by step.
Prerequisites
- 12c binary installed with the database.
- 19c binary installed without a database.
- Sufficient disk space for tablespace and archive growth.
- Minimum 6 hours of downtime for a production database.
Environment Used in This Guide
| 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 |
| 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 = "09-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
Run this at both the CDB and PDB level so you have a clean before-and-after comparison once the upgrade finishes.
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> 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: Prepare the CDB and PDBs Before Upgrading
A few housekeeping tasks reduce the chance of surprises during the upgrade: refreshed dictionary stats, an emptied recycle bin, current materialized views, and a guaranteed restore point that lets you roll back cleanly if anything goes wrong. Run these steps on the CDB and on each PDB.
Gather Dictionary Stats:
SQL> SET ECHO ON;
SQL> SET SERVEROUTPUT ON;
SQL> EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
PL/SQL procedure successfully completed.
Purge the Recycle Bin:
SQL> PURGE DBA_RECYCLEBIN;
DBA Recyclebin purged.
Refresh Materialized Views:
SQL> declare
list_failures integer(3) :=0;
begin
DBMS_MVIEW.REFRESH_ALL_MVIEWS(list_failures,'C','', TRUE, FALSE);
end;
/
PL/SQL procedure successfully completed.
Create a Guaranteed Flashback Restore Point (at the CDB):
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
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>
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>
SQL> select * from V$restore_point;
no rows selected.
SQL> create restore point pre_upgrade12c guarantee flashback database;
Restore point created.
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 GUARANTEE_ TIME
-------------------- ---------- ------------------------------------------------------------
PRE_UPGRADE12C YES 10-JUL-25 09.29.38.000000000 PM
SQL>
Step 3: Run the Pre-Upgrade Script
Oracle's preupgrade.jar, run from the 19c home's admin directory, scans the 12c database and generates fixup scripts along with a log of what needs attention before and after the upgrade.
[oracle@devdb ~]$ mkdir preupgrade
[oracle@devdb ~]$ cd preupgrade/
[oracle@devdb preupgrade]$ pwd
/home/oracle/preupgrade
[oracle@devdb ~]$ /u01/app/oracle/product/12c/db_1/jdk/bin/java -jar /u01/app/oracle/product/19c/db_home/rdbms/admin/preupgrade.jar FILE DIR /home/oracle/preupgrade
==================
PREUPGRADE SUMMARY
==================
/home/oracle/preupgrade/preupgrade.log
/home/oracle/preupgrade/preupgrade_fixups.sql
/home/oracle/preupgrade/postupgrade_fixups.sql
Execute fixup scripts across the entire CDB:
Before upgrade:
1. Execute preupgrade fixups with the below command
$ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /home/oracle/preupgrade/ -b preup_devdb /home/oracle/preupgrade/preupgrade_fixups.sql
2. Review logs under /home/oracle/preupgrade/
After the upgrade:
1. Execute postupgrade fixups with the below command
$ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /home/oracle/preupgrade/ -b postup_devdb /home/oracle/preupgrade/postupgrade_fixups.sql
2. Review logs under /home/oracle/preupgrade/
Preupgrade complete: 2025-07-10T21:36:37
Step 4: Run preupgrade_fixups.sql
Run this script against the CDB and each PDB. The output below is from the CDB; most listed issues are informational only and don't block the upgrade.
SQL> @/home/oracle/preupgrade/preupgrade_fixups.sql
Executing Oracle PRE-Upgrade Fixup Script
Auto-Generated by: Oracle Preupgrade Script
Version: 19.0.0.0.0 Build: 1
Generated on: 2025-07-10 21:35:02
For Source Database: DEVDB
Source Database Version: 12.2.0.1.0
For Upgrade to Version: 19.0.0.0.0
Executing in container: CDB$ROOT
Preup Preupgrade
Action Issue Is
Number Preupgrade Check Name Remedied Further DBA Action
------ ------------------------ ---------- --------------------------------
1. min_recovery_area_size YES None.
2. pre_fixed_objects YES None.
3. tablespaces_info NO Informational only.
Further action is optional.
4. cycle_number NO Informational only.
Further action is optional.
5. rman_recovery_version 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 is not ready
for upgrade. To resolve the outstanding issues, start by reviewing
the preupgrade_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.
Session altered.
Step 5: Run DBUA from the 19c Oracle Home
DBUA drives the actual upgrade through a GUI wizard. Launch it from the 19c home, not the 12c home.
[oracle@devdb bin]$ pwd
/u01/app/oracle/product/19c/db_home/bin
[oracle@devdb bin]$ /u01/app/oracle/product/19c/db_home/bin/./dbua
Logs directory: /u01/app/oracle/cfgtoollogs/dbua/upgrade2025-07-11_07-41-14AM
Now a GUI window appears. Follow the steps below.
Verify the database name and Oracle Home, provide the credentials, then click Next.
Click Next.
Wait for the prerequisite check to complete.
Click Fix & Check Again if any issues are flagged.
Click Next.
Click Next.
Select the guaranteed flashback restore point created earlier, then click Next.
The listener can be created later, so click Next.
Click Next.
Click Finish to start the upgrade.
Monitor the upgrade progress.
The upgrade is now complete. Review the summary.
Click Close.
Step 6: Run postupgrade_fixups.sql
Run the post-upgrade fixup script against the CDB and each PDB. This closes out the tasks that could only be completed after the database was on 19c.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 DEVDBPDB READ WRITE NO
SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql
Session altered.
PL/SQL procedure successfully completed.
Commit complete.
Session altered.
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: 1
Generated on: 2025-07-10 21:35:20
For Source Database: DEVDB
Source Database Version: 12.2.0.1.0
For Upgrade to Version: 19.0.0.0.0
Executing in container: CDB$ROOT
Preup Preupgrade
Action Issue Is
Number Preupgrade Check Name Remedied Further DBA Action
------ ------------------------ ---------- --------------------------------
6. old_time_zones_exist YES None.
7. dir_symlinks 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.
Session altered.
SQL>
SQL>
SQL> alter session set container=DEVDBPDB;
SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql
Session altered.
PL/SQL procedure successfully completed.
Commit complete.
Session altered.
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: 1
Generated on: 2025-07-10 21:35:20
For Source Database: DEVDB
Source Database Version: 12.2.0.1.0
For Upgrade to Version: 19.0.0.0.0
Executing in container: DEVDBPDB
Preup Preupgrade
Action Issue Is
Number Preupgrade Check Name Remedied Further DBA Action
------ ------------------------ ---------- --------------------------------
3. old_time_zones_exist YES None.
4. dir_symlinks YES None.
5. post_dictionary YES None.
6. 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.
Session altered.
Step 7: Perform the Post-Upgrade Check
Confirm the database is running on 19c, the time zone file is current, and no objects came out invalid. Check this at both the CDB and PDB level.
[oracle@devdb bin]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 11 12:18:16 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> 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>
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>
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 8: Drop the Flashback Restore Point
With the upgrade verified, the guaranteed restore point is no longer needed and can be dropped to stop it from holding onto flashback data.
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 GUARANTEE_ TIME
-------------------- ---------- ------------------------------------------------------------
PRE_UPGRADE12C YES 10-JUL-25 09.29.38.000000000 PM
SQL>
SQL> drop restore point PRE_UPGRADE12C;
Restore point dropped.
SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;
no rows selected
SQL>
Step 9: 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>
Step 10: Update the Environment and Create a Listener
Point the OS environment at the 19c home and confirm the listener is running. If you haven't set one up yet, see our guide on creating a listener using NETCA.
[oracle@devdb ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
ORACLE_HOME=/u01/app/oracle/product/19c/db_home
export ORACLE_HOME
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_SID=devdb
export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:.
export LD_LIBRARY_PATH
LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib:/lib
export LIBPATH
TNS_ADMIN=${ORACLE_HOME}/network/admin
export TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH:.
export PATH
[oracle@devdb ~]$
[oracle@devdb ~]$ lsnrctl status LISTENER
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 10-JUL-2025 22:37:31
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=devdb)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 10-JUL-2025 22:37:11
Uptime 0 days 0 hr. 1 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/19c/db_home/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devdb.oraeasy.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "396c6dec59d53653e0650deef82416fe" has 1 instance(s).
Instance "devdb", status READY, has 1 handler(s) for this service...
Service "4700a987085a3dfae05387e5e50a8c7b" has 1 instance(s).
Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdb" has 1 instance(s).
Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdbXDB" has 1 instance(s).
Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdbpdb" has 1 instance(s).
Instance "devdb", status READY, has 1 handler(s) for this service...
The command completed successfully
Step 11: Verify the Table Data
Finally, 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 Sun Jul 13 22:38:06 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Enter password:
Last Successful login time: Wed Jul 09 2025 20:26:11 +05:30
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL>
SQL> show user
USER is "TEST"
SQL>
SQL> def
DEFINE _DATE = "10-JUL-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "DEVDBPDB" (CHAR)
DEFINE _USER = "TEST" (CHAR)
DEFINE _PRIVILEGE = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1903000000" (CHAR)
DEFINE _EDITOR = "vi" (CHAR)
DEFINE _O_VERSION = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0" (CHAR)
DEFINE _O_RELEASE = "1903000000" (CHAR)
SQL>
SQL> select count(*) from COMPANY;
COUNT(*)
----------
3
SQL>
The 12c to 19c upgrade activity has now been completed successfully using DBUA. If you'd rather run the same upgrade by hand, or want to understand what DBUA is doing under the hood, the next post in this series covers the manual method.
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.

















Comments
Post a Comment