1. Take the full RMAN backup of 12c DB.
2. Take the 12.2.0.1 Home backup.
[oracle@prod 12c]$ cd /u01/app/oracle/product/12c
[oracle@prod 12c]$ tar -pcvf db_1_bkp.tar db_1
[oracle@prod 12c]$ ls -lrt
total 11235676
drwxr-xr-x 74 oracle oinstall 4096 Jun 14 06:53 db_1
-rw-r–r– 1 oracle oinstall 11505326080 Jun 14 06:55 db_1_bkp.tar
3. Ensure DB backup is completed before upgrade.
SQL> SELECT * FROM v$backup WHERE status != ‘NOT ACTIVE’;
no rows selected
4. Check the invalid objects and make them valid. Also, SYS and SYSTEM objects should not be in invalid state.
SQL> select count(*) from dba_objects where status=’INVALID’;
COUNT(*)
———-
0
5. Check the status of dba registry components before upgrade. All components should be in valid status.
set linesize 300
col comp_name for a50
col version for a15
col status for a10
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
15 rows selected.
6. Take the compatible parameter value of 12c DB to compare after the DB upgrade.
SQL> show parameter compatible
NAME TYPE VALUE
———————————— ———– ——————————
compatible string 12.2.0
noncdb_compatible boolean FALSE
7. Take the time zone value of 12c DB.
set linesize 300
col property_name for a30
col value for a20
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE ‘DST_%’
ORDER BY PROPERTY_NAME;
PROPERTY_NAME VALUE
—————————— ——————–
DST_PRIMARY_TT_VERSION 26
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE
—
col version for 9999999999999
SELECT version FROM v$timezone_file;
VERSION
————–
26
8. Enable archive mode mode and Fast Recovery Area (FRA).
SQL> select flashback_on from v$database;
FLASHBACK_ON
————————————————————————
NO
SQL> show parameter recovery
NAME TYPE VALUE
———————————— ———– ——————————
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
recovery_parallelism integer 0
remote_recovery_file_dest string
SQL> alter system set db_recovery_file_dest_size=20G;
System altered.
SQL> alter system set db_recovery_file_dest=’/u01/app/oracle/fra’;
System altered.
SQL> show parameter recovery
NAME TYPE VALUE
———————————— ———– ——————————
db_recovery_file_dest string /u01/app/oracle/fra
db_recovery_file_dest_size big integer 20G
recovery_parallelism integer 0
remote_recovery_file_dest string
—
SQL> select name,open_mode,log_mode from v$database;
NAME OPEN_MODE LOG_MODE
——— ——————– ————
PROD READ WRITE NOARCHIVELOG
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 2063597568 bytes
Fixed Size 8622528 bytes
Variable Size 587206208 bytes
Database Buffers 1459617792 bytes
Redo Buffers 8151040 bytes
Database mounted.
SQL>alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> select name,open_mode,log_mode from v$database;
NAME OPEN_MODE LOG_MODE
——— ——————– ————
PROD READ WRITE ARCHIVELOG
9. Check the status of all materialized views (MV), and refresh any materialized views that are not fresh.
SQL> SELECT o.name FROM sys.obj$ o, sys.user$ u, sys.sum$ s WHERE o.type# = 42 AND bitand(s.mflags, 8) =8;
no rows selected
10. Download the most recent version of “Autoupgrade.jar” file, from Doc 2485457.1
In 19c home, take the backup of existing autoupgrade.jar file and place the latest autoupgrade.jar file.
cd /u01/app/oracle/product/19.0.0/db_1/rdbms/admin
mv autoupgrade.jar autoupgrade.jar_bkp
cp /tmp/autoupgrade.jar .
11. Generate a sample config file and edit accordingly.
Make sure export the 12c Oracle home before running the “autoupgrade.jar” commands.
export ORACLE_HOME=/u01/app/oracle/product/12c/db_1
/u01/app/oracle/product/19.0.0/db_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/db_1/rdbms/admin/autoupgrade.jar -create_sample_file config /u01/config.cfg
[oracle@prod ~]$ /u01/app/oracle/product/19.0.0/db_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/db_1/rdbms/admin/autoupgrade.jar -create_sample_file
config /u01/config.cfg
Created sample configuration file /u01/config.cfg
—
Now, edit the config file
upg1.log_dir=/u01/app/oracle/cfgtoollogs/autoupgrade
upg1.sid=prod
upg1.source_home=/u01/app/oracle/product/12c/db_1
upg1.target_home=/u01/app/oracle/product/19.0.0/db_1
upg1.start_time=NOW
upg1.upgrade_node=prod
upg1.run_utlrp=yes
upg1.timezone_upg=yes
upg1.target_version=19
To check the list of checks which autoaupgrade.jar performs use below command.
/u01/app/oracle/product/19.0.0/db_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/db_1/rdbms/admin/autoupgrade.jar -listchecks
12. Run the upgrade in analyze mode to validate any expected issues with the upgrade.
/u01/app/oracle/product/19.0.0/db_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/db_1/rdbms/admin/autoupgrade.jar -config /u01/config.cfg -mode analyze
[oracle@prod u01]$ /u01/app/oracle/product/19.0.0/db_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/db_1/rdbms/admin/autoupgrade.jar -config /u01/config.cfg -mode analyze
AutoUpgrade 25.3.250509 launched with default internal options
Processing config file …
+——————————–+
| Starting AutoUpgrade execution |
+——————————–+
1 Non-CDB(s) will be analyzed
Type ‘help’ to list console commands
upg> status
Config
User configuration file [/u01/config.cfg]
General logs location [/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto]
Mode [ANALYZE]
Jobs Summary
Total databases in configuration file [1]
Total Non-CDB being processed [1]
Total Containers being processed [0]
Jobs finished successfully [0]
Jobs finished/stopped [0]
Jobs in progress [1]
Progress
+—+———————————————————+
|Job| Progress|
+—+———————————————————+
|102|[||||||||||||||||| ] 33 %|
+—+———————————————————+
upg>
upg> Job 102 completed
——————- Final Summary ——————–
Number of databases [ 1 ]
Jobs finished [1]
Jobs failed [0]
Please check the summary report at:
/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.html
/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log
—
[oracle@prod ~]$ cat /u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log
==========================================
Autoupgrade Summary Report
==========================================
[Date] Sat Jun 14 08:33:16 IST 2025
[Number of Jobs] 1
==========================================
[Job ID] 102
==========================================
[DB Name] prod
[Version Before Upgrade] 12.2.0.1.0
[Version After Upgrade] 19.27.0.0.0
——————————————
[Stage Name] PRECHECKS
[Status] SUCCESS
[Start Time] 2025-06-14 08:32:48
[Duration] 0:00:26
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/102/prechecks
[Detail] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/102/prechecks/prod_preupgrade.log
Check passed and no manual intervention needed
——————————————
[oracle@prod ~]$
Note:
The output files list the status of the analysis, and any manual intervention that is needed before an upgrade can take place.
13. Run Autoupgrade in Deploy mode.
Important:
Before running Autoupgrade in Deploy mode, we must validate that there are no invalid objects or components that may affect the process.
/u01/app/oracle/product/19.0.0/db_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/db_1/rdbms/admin/autoupgrade.jar -config /u01/config.cfg -mode deploy
[oracle@prod ~]$ /u01/app/oracle/product/19.0.0/db_1/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/db_1/rdbms/admin/autoupgrade.jar -config /u01/config.cfg -mode deploy
AutoUpgrade 25.3.250509 launched with default internal options
Processing config file …
+——————————–+
| Starting AutoUpgrade execution |
+——————————–+
1 Non-CDB(s) will be processed
Type ‘help’ to list console commands
upg>
upg> lsj
+—-+——-+———+———+——-+———-+——-+—————————-+
|Job#|DB_NAME| STAGE|OPERATION| STATUS|START_TIME|UPDATED| MESSAGE|
+—-+——-+———+———+——-+———-+——-+—————————-+
| 103| prod|PRECHECKS|EXECUTING|RUNNING| 08:40:54|20s ago|Loading database information|
+—-+——-+———+———+——-+———-+——-+—————————-+
Total jobs 1
upg>
upg> status -job 103
Details
Job No 103
Oracle SID prod
Start Time 25/06/14 08:40:54
Elapsed (min): 0
End time: N/A
Logfiles
Logs Base: /u01/app/oracle/cfgtoollogs/autoupgrade/prod
Job logs: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103
Stage logs: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/prefixups
TimeZone: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/temp
Remote Dirs:
Stages
SETUP <1 min
GRP <1 min
PREUPGRADE <1 min
PRECHECKS <1 min
PREFIXUPS ~0 min (RUNNING)
DRAIN
DBUPGRADE
POSTCHECKS
POSTFIXUPS
POSTUPGRADE
SYSUPDATES
Stage-Progress Per Container
+——–+———+
|Database|PREFIXUPS|
+——–+———+
| prod| 0 % |
+——–+———+
upg>
upg> status -job 103
Details
Job No 103
Oracle SID prod
Start Time 25/06/14 08:40:54
Elapsed (min): 12
End time: N/A
Logfiles
Logs Base: /u01/app/oracle/cfgtoollogs/autoupgrade/prod
Job logs: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103
Stage logs: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/dbupgrade
TimeZone: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/temp
Remote Dirs:
Stages
SETUP <1 min
GRP <1 min
PREUPGRADE <1 min
PRECHECKS <1 min
PREFIXUPS 3 min
DRAIN <1 min
DBUPGRADE ~7 min (RUNNING)
POSTCHECKS
POSTFIXUPS
POSTUPGRADE
SYSUPDATES
Stage-Progress Per Container
+——–+———+
|Database|DBUPGRADE|
+——–+———+
| prod| 14 % |
+——–+———+
upg>
upg> status -job 103
Details
Job No 103
Oracle SID prod
Start Time 25/06/14 08:40:54
Elapsed (min): 48
End time: N/A
Logfiles
Logs Base: /u01/app/oracle/cfgtoollogs/autoupgrade/prod
Job logs: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103
Stage logs: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/postfixups
TimeZone: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/temp
Remote Dirs:
Stages
SETUP <1 min
GRP <1 min
PREUPGRADE <1 min
PRECHECKS <1 min
PREFIXUPS 3 min
DRAIN <1 min
DBUPGRADE 42 min
DISPATCH <1 min
POSTCHECKS <1 min
DISPATCH <1 min
POSTFIXUPS ~0 min (RUNNING)
POSTUPGRADE
SYSUPDATES
Stage-Progress Per Container
+——–+———-+
|Database|POSTFIXUPS|
+——–+———-+
| prod| 0 % |
+——–+———-+
upg>
Stages
SETUP <1 min
GRP <1 min
PREUPGRADE <1 min
PRECHECKS <1 min
PREFIXUPS 3 min
DRAIN <1 min
DBUPGRADE 42 min
DISPATCH <1 min
POSTCHECKS <1 min
DISPATCH <1 min
POSTFIXUPS 12 min
POSTUPGRADE ~1 min (RUNNING)
SYSUPDATES
Stage-Progress Per Container
The Stage POSTUPGRADE does not have any data to show
upg>
upg>
upg> Job 103 completed
——————- Final Summary ——————–
Number of databases [ 1 ]
Jobs finished [1]
Jobs failed [0]
Jobs restored [0]
Jobs pending [0]
—- Drop GRP at your convenience once you consider it is no longer needed —-
Drop GRP from prod: drop restore point AUTOUPGRADE_9212_PROD122010
Please check the summary report at:
/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.html
/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log
[oracle@prod ~]$
—-
[oracle@prod ~]$ cat /u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log
==========================================
Autoupgrade Summary Report
==========================================
[Date] Sat Jun 14 09:42:57 IST 2025
[Number of Jobs] 1
==========================================
[Job ID] 103
==========================================
[DB Name] prod
[Version Before Upgrade] 12.2.0.1.0
[Version After Upgrade] 19.27.0.0.0
——————————————
[Stage Name] GRP
[Status] SUCCESS
[Start Time] 2025-06-14 08:40:54
[Duration] 0:00:02
[Detail] Please drop the following GRPs after Autoupgrade completes:
AUTOUPGRADE_9212_PROD122010
——————————————
[Stage Name] PREUPGRADE
[Status] SUCCESS
[Start Time] 2025-06-14 08:40:57
[Duration] 0:00:00
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/preupgrade
——————————————
[Stage Name] PRECHECKS
[Status] SUCCESS
[Start Time] 2025-06-14 08:40:57
[Duration] 0:00:43
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/prechecks
[Detail] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/prechecks/prod_preupgrade.log
Check passed and no manual intervention needed
——————————————
[Stage Name] PREFIXUPS
[Status] SUCCESS
[Start Time] 2025-06-14 08:41:40
[Duration] 0:03:43
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/prefixups
[Detail] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/prefixups/prefixups.html
——————————————
[Stage Name] DRAIN
[Status] SUCCESS
[Start Time] 2025-06-14 08:45:24
[Duration] 0:00:45
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/drain
——————————————
[Stage Name] DBUPGRADE
[Status] SUCCESS
[Start Time] 2025-06-14 08:46:10
[Duration] 0:42:37
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/dbupgrade
——————————————
[Stage Name] POSTCHECKS
[Status] SUCCESS
[Start Time] 2025-06-14 09:29:05
[Duration] 0:00:02
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/postchecks
[Detail] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/postchecks/prod_postupgrade.log
Check passed and no manual intervention needed
——————————————
[Stage Name] POSTFIXUPS
[Status] SUCCESS
[Start Time] 2025-06-14 09:29:10
[Duration] 0:12:22
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/postfixups
[Detail] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/postfixups/postfixups.html
——————————————
[Stage Name] POSTUPGRADE
[Status] SUCCESS
[Start Time] 2025-06-14 09:41:33
[Duration] 0:01:23
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/postupgrade
——————————————
[Stage Name] SYSUPDATES
[Status] SUCCESS
[Start Time] 2025-06-14 09:42:57
[Duration] 0:00:00
[Log Directory] /u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/sysupdates
——————————————
Summary:/u01/app/oracle/cfgtoollogs/autoupgrade/prod/103/dbupgrade/upg_summary.log
14. Post upgrade, check the DB version.
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
export ORACLE_SID=prod
export PATH=$PATH:$ORACLE_HOME/bin
sqlplus / as sysdba
SQL> select name,version,status from v$database, v$instance;
NAME VERSION STATUS
———- —————– ————
PROD 19.0.0.0.0 OPEN
SQL> select banner_full from v$version;
BANNER_FULL
——————————————————————————–
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.27.0.0.0
15. Post upgrade, check the invalid objects and make them valid. Also, SYS and SYSTEM objects should not be in invalid state.
SQL> select count(*) from dba_objects where status=’INVALID’;
COUNT(*)
———-
0
16. Post upgrade, check the status of dba registry components before upgrade. All components should be in valid status.
set lines 1234 pages 1234
col comp_name for a50
col version for a15
col status for a10
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
15 rows selected.
17. Post upgrade, check the time zone value of 19c DB.
set linesize 300
col property_name for a30
col value for a20
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE ‘DST_%’
ORDER BY PROPERTY_NAME;
PROPERTY_NAME VALUE
—————————— ——————–
DST_PRIMARY_TT_VERSION 44
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE
col version for 9999999999999
SELECT version FROM v$timezone_file;
VERSION
————–
44
18. Post upgrade, update the compatible parameter value after application testing.
After successful application testing, update the compatible parameter.
Disclaimer:
Please note the above information is only for educational purpose and practised in personal test database only. Always test in test database before implementing in production database. The pre-requisites and ways of implementing may vary from one environment to another. Hence, not providing guarantee that it will work in your environment.