Why 19c Is the Right Target
Oracle 19c (19.3+) is Oracle's long-term support release for the 12.2 family — full Premier Support runs through April 2024, Extended Support through April 2027. It is the most stable, best-patched version of the 12.2 codebase. More importantly for EBS and third-party applications, 19c is the last version that maintains full compatibility with 12c feature sets.
If you are on 12.1.0.2 or 12.2.0.1, upgrading to 19c is a direct, supported path. If you are on 11.2.0.4, you can go direct to 19c as well. Oracle does not require you to step through intermediate versions.
Before You Start: Pre-Upgrade Checks
Step 1: Run preupgrade.jar
Oracle provides a free diagnostic tool that checks your database for upgrade-blocking conditions:
# On the source (12c) database server
Download preupgrade.jar from MOS (Doc ID 884522.1)
Or use the one bundled in your 19c ORACLE_HOME:
java -jar $ORACLE_HOME_19C/rdbms/admin/preupgrade.jar TEXT TERMINAL DIR /tmp/preupgrade_output
This connects to the database via bequeath (must run as oracle OS user)
and generates:
/tmp/preupgrade_output/preupgrade.log — human-readable report
/tmp/preupgrade_output/preupgrade_fixups.sql — fixups to run BEFORE upgrade
/tmp/preupgrade_output/postupgrade_fixups.sql — fixups to run AFTER upgrade
Read through every WARNING and RECOMMEND item in preupgrade.log. The most common blockers:
Timezone version mismatch: Your DB uses TZ version 14, the 19c home ships with TZ version 32. You must update to the target version. Run $ORACLE_HOME_19C/OPatch/datapatch post-upgrade — or use the timezone upgrade utility.
Invalid/broken objects: Pre-upgrade fixups recompile known Oracle-owned invalid objects. Custom schema invalids must be resolved by you.
Deprecated parameters: Parameters removed in 19c that must be cleared from spfile before upgrade. preupgrade.log lists them explicitly.
Step 2: Run preupgrade_fixups.sql on the SOURCE database
-- Connect as SYSDBA to the source database
@/tmp/preupgrade_output/preupgrade_fixups.sql
This runs automatically — it fixes timezone issues, gathers optimizer statistics, recompiles invalid objects. Review the output for any FAILURE lines.
Step 3: Identify and fix custom invalid objects
-- Find all non-Oracle invalid objects
SELECT owner, object_type, object_name, status
FROM dba_objects
WHERE status = 'INVALID'
AND owner NOT IN (
'SYS','SYSTEM','OUTLN','DBA_BUNDLE','OJVMSYS','LBACSYS',
'DBSNMP','APPQOSSYS','DBSFWUSER','GSMADMIN_INTERNAL',
'CTXSYS','ORDPLUGINS','ORDDATA','ORDSYS','SI_INFORMTN_SCHEMA',
'MDSYS','OLAPSYS','DVSYS','AUDSYS','DVF','GGSYS','APEX_PUBLIC_USER'
)
ORDER BY owner, object_type, object_name;
-- Recompile invalid objects in a schema
EXEC DBMS_UTILITY.COMPILE_SCHEMA(schema => 'YOUR_SCHEMA', compile_all => FALSE);
-- Or use utlrp.sql to recompile all (takes 5–30 min on large databases)
@$ORACLE_HOME/rdbms/admin/utlrp.sql
The AutoUpgrade Tool
AutoUpgrade is Oracle's recommended upgrade method from 19.3 onwards. It handles the entire upgrade process: pre-checks, mode switching, upgrade execution, post-upgrade fixups, and compilation.
Download and Version Check
AutoUpgrade is distributed as a single JAR. Always use the latest version (downloaded from MOS Doc ID 2485457.1 — do not use the one bundled in the 19c home, it may be outdated):
# Check version
java -jar autoupgrade.jar -version
Should be 23.x or later for production use
Verify Java version (minimum: Java 8)
java -version
Create the Configuration File
# /home/oracle/autoupgrade/config.cfg
Global settings
global.autoupg_log_dir=/u01/autoupgrade/logs
Database 1: PRODDB
upg1.dbname=PRODDB
upg1.start_time=NOW
upg1.source_home=/u01/app/oracle/product/12.2.0/db_1
upg1.target_home=/u01/app/oracle/product/19.3.0/db_1
upg1.sid=PRODDB
upg1.log_dir=/u01/autoupgrade/logs/PRODDB
upg1.upgrade_node=localhost
upg1.run_utlrp=yes
upg1.timezone_upg=yes
Optional: retain old parameters for analysis (AutoUpgrade strips deprecated ones)
upg1.drop_grp_after_upgrade=no
Analyze Mode (No Changes Made)
# Run analyze — reads the database and generates a report
java -jar autoupgrade.jar -config /home/oracle/autoupgrade/config.cfg -mode analyze
Review:
cat /u01/autoupgrade/logs/PRODDB//autoupgrade_.log | grep -E "ERROR|WARNING|CRITICAL"
Fixups Mode (Prepares the Database)
# Run fixups — makes changes needed before upgrade, but does not upgrade yet
java -jar autoupgrade.jar -config /home/oracle/autoupgrade/config.cfg -mode fixups
Deploy Mode (Full Upgrade)
# Full unattended upgrade
nohup java -jar autoupgrade.jar -config /home/oracle/autoupgrade/config.cfg -mode deploy > /u01/autoupgrade/logs/autoupgrade.out 2>&1 &
Monitor progress (while running)
tail -f /u01/autoupgrade/logs/PRODDB//autoupgrade_.log
Or use the interactive console
java -jar autoupgrade.jar -config /home/oracle/autoupgrade/config.cfg -mode deploy
Type 'lsj' to list jobs, 'status -job 1' for detail
AutoUpgrade will:
- Shut down the source database cleanly
- Start it in upgrade mode using the 19c home
- Run catupgrd.sql (the core catalog upgrade)
- Run post-upgrade fixups
- Recompile all invalid objects
- Update timezone data
- Restart the database in normal mode
On a typical 200GB database, expect 45–90 minutes. For multi-terabyte databases, the catalog upgrade is the bottleneck (not data volume) and usually completes in under 3 hours.
Post-Upgrade Tasks
Verify the Upgrade
-- Check database version
SELECT version FROM v$instance;
-- Should show 19.x.x.x.x
-- Check for remaining invalid objects
SELECT count(*), status FROM dba_objects GROUP BY status;
-- Run post-upgrade fixups
@/tmp/preupgrade_output/postupgrade_fixups.sql
-- Gather fresh optimizer statistics (critical — skip this and you will have bad plans)
EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
EXEC DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
Update Compatibility Parameter
-- Check current compatible parameter
SHOW PARAMETER compatible;
-- It was set to 12.2.0 for the upgrade — once you are satisfied, advance it:
-- WARNING: This is irreversible. The database cannot be downgraded after this.
ALTER SYSTEM SET COMPATIBLE = '19.0.0' SCOPE=SPFILE;
SHUTDOWN IMMEDIATE;
STARTUP;
Wait at least 2–4 weeks before advancing compatible. If you discover application issues, you can still restore from backup to 12c as long as compatible < 19.
Update timezone (if not done by AutoUpgrade)
# Check current timezone version
SELECT version FROM v$timezone_file;
If < 32, run the DBMS_DST upgrade (required for correct timestamp handling)
This is a two-phase operation requiring a maintenance window
EXEC DBMS_DST.BEGIN_UPGRADE(32);
... application downtime here ...
EXEC DBMS_DST.UPGRADE_DATABASE;
EXEC DBMS_DST.END_UPGRADE;
Update listener and tnsnames
# Update listener.ora to point to new ORACLE_HOME
Remove the 12c entry, add 19c:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbhost)(PORT = 1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = PRODDB)
(ORACLE_HOME = /u01/app/oracle/product/19.3.0/db_1)
(SID_NAME = PRODDB)
)
)
Restart listener from 19c home
$ORACLE_HOME_19C/bin/lsnrctl stop
$ORACLE_HOME_19C/bin/lsnrctl start
Common Problems and Fixes
Upgrade hangs at "Running component Catalog": Usually a contention issue in the catalog upgrade SQL. Check alert log for ORA-1555 (undo space) or ORA-60 (deadlock). Adding undo space and restarting from the checkpoint usually resolves it.
catupgrd.sql fails with ORA-04063: Invalid packages that the upgrade depends on. Run utlrp.sql manually, then re-run the catupgrd script from where it failed (AutoUpgrade can resume from checkpoint).
Applications fail post-upgrade with ORA-00904 (invalid identifier): A column or feature was removed or renamed in 19c. The most common is column names that became reserved words. Fix by using column aliases in queries.
JDBC thin driver connection failures: Old JDBC drivers (ojdbc6.jar) are incompatible with 19c in some combinations. Upgrade to ojdbc8.jar from the 19c home.
EBS R12.2 on 19c: Run the Oracle E-Business Suite Pre-Upgrade steps first (MOS Doc ID 2552566.1). EBS 12.2.7+ is certified on 19c. Run adop phase=apply for any pending patches after the upgrade.
Rollback Plan
AutoUpgrade creates a guaranteed restore point (GRP) before the upgrade unless you explicitly disable it:
-- If you need to roll back (must be done before advancing compatible)
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
FLASHBACK DATABASE TO RESTORE POINT AUTOUPGRADE_9212_PRODDB12201;
ALTER DATABASE OPEN RESETLOGS;
-- Re-link the database to the 12c home
The GRP is automatically dropped by AutoUpgrade after 30 days. Make sure you have a physical backup as well — GRP-based rollback requires the FRA to have enough space for all redo since the snapshot.
TuneVault's health check runs the Oracle 19c readiness checks automatically, identifying deprecated parameters, invalid objects, and timezone version mismatches before you start your upgrade window.