This post demonstrates the reverting an Oracle Database upgrade using Flashback Database and AutoUpgrade. If the database upgrade failed or stopped during database upgrade with AutoUpgrade, using GRP and Autoupgrade is the quickest and easiest method to rollback the database to previous version.
This post demonstrated with high level steps only. Make sure to perform pre checks and post checks of the upgrade activity.
Note: Ensure to include “upg1.restoration= YES” in config.cfg file to create GRP by Autoaupgrade.
1. The Autoaupgrade job has been stopped at 38%.
upg> status -job 101
Details
Job No 101
Oracle SID prod
Start Time 26/03/17 07:04:17
Elapsed (min): 7
End time: N/A
Logfiles
Logs Base: /u01/app/oracle/cfgtoollogs/autoupgrade/prod
Job logs: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/101
Stage logs: /u01/app/oracle/cfgtoollogs/autoupgrade/prod/101/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 1 min
DRAIN <1 min
DBUPGRADE ~5 min (RUNNING)
POSTCHECKS
POSTFIXUPS
POSTUPGRADE
SYSUPDATES
Stage-Progress Per Container
+——–+———+
|Database|DBUPGRADE|
+——–+———+
| prod| 10 % |
+——–+———+
upg> status
Config
User configuration file [/u01/config.cfg]
General logs location [/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto]
Mode [DEPLOY]
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 [1]
Jobs in progress [0]
Progress
+—+———————————————————+
|Job| Progress|
+—+———————————————————+
|101|[|||||||||||||||||||| ] 38 %|
+—+———————————————————+
2. Start the upgrade failed database (19c) to the previous version (11g).
Set the environment to target DB (19c)
[oracle@prod ~]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1
[oracle@prod ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@prod ~]$ export ORACLE_SID=prod
[oracle@prod ~]$ sq
Startup the 19c database. At this stage, we may not able to bring up the database as the upgrade was not successful. Hence, autoupgrade hasn’t copied the init parameter file the new ORACLE HOME. So we have to use the pfile created by the Autoupgrade.
SQL*Plus: Release 19.0.0.0.0 – Production on Tue Mar 17 07:23:59 2026
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file ‘/u01/app/oracle/product/19.0.0/db_1/dbs/initprod.ora’
SQL>
SQL> startup upgrade pfile=/u01/app/oracle/cfgtoollogs/autoupgrade/prod/temp/after_upgrade_pfile_prod.ora
ORACLE instance started.
Total System Global Area 2617245048 bytes
Fixed Size 8899960 bytes
Variable Size 553648128 bytes
Database Buffers 2046820352 bytes
Redo Buffers 7876608 bytes
Database mounted.
Database opened.
SQL> @db
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE INSTANCE_NAME HOST_NAME STARTUP_TIME
———- ————— ———- —————— ————— —————- ——————–
PROD prod READ WRITE PRIMARY prod prod 17-MAR-2026 07:36
BANNER BANNER_FULL
——————————————————————————– —————————————————————————————————————————————————————-
BANNER_LEGACY CON_ID
——————————————————————————– ———-
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production 0
Now, the database is in open mode and version is 19c.
3. Revert the database to previous version.
During PREFIXUPS stage, the Autoupgrade will create Guaranteed Restore Point which will help to revert the database to previous version.
SQL> set lines 1234 pages 1234
col name for a24
col time for a34
select name, scn, time, database_incarnation#,guarantee_flashback_database,storage_size from v$restore_point;
NAME SCN TIME DATABASE_INCARNATION# GUA STORAGE_SIZE
———————— ———- ———————————- ——————— — ————
BEFORE_UPGRADE 959979 17-03-26 6:52:59.000000000 AM 2 YES 0
AUTOUPGRADE_9212_PROD112 960765 17-03-26 7:04:17.000000000 AM 2 YES 367001600
040
Now, revert the database to previous version.
[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 -restore -jobs 101
Previous execution found loading latest data
Total jobs being restored: 1
+——————————–+
| Starting AutoUpgrade execution |
+——————————–+
Job 101 completed
——————- Final Summary ——————–
Number of databases [ 1 ]
Jobs restored [1]
Jobs failed [0]
——————– JOBS PENDING ——————–
Job 101 for prod
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
Exiting
[oracle@prod ~]$
—
Set the environment to previous release (11g), connect to the database and check the version.
SQL> @db
NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE INSTANCE_NAME HOST_NAME STARTUP_TIME
———- ————— ———- —————— ————— —————- ——————–
PROD prod READ WRITE PRIMARY prod prod 17-MAR-2026 07:49
BANNER
——————————————————————————–
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
PL/SQL Release 11.2.0.4.0 – Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 – Production
NLSRTL Version 11.2.0.4.0 – Production
Check the Autoupgrade status log for any errors and status of revert operation.
[oracle@prod ~]$ cat /u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log
==========================================
Autoupgrade Summary Report
==========================================
[Date] Tue Mar 17 07:49:33 IST 2026
[Number of Jobs] 1
==========================================
[Job ID] 101
==========================================
[DB Name] prod
[Version Before Upgrade] 11.2.0.4.0
[Version After Upgrade] 19.3.0.0.0
——————————————
[Stage Name] GRPRESTORE
[Status] SUCCESS
[Start Time]
[Duration]
——————————————
Restoration:/u01/app/oracle/cfgtoollogs/autoupgrade/prod/101/restoration_user.log
The revert operation of database to previous release is successful.
From Alert log:
==========
Tue Mar 17 07:48:39 2026
ALTER DATABASE MOUNT
Successful mount of redo thread 1, with mount id 639956823
Allocated 8388608 bytes in shared pool for flashback generation buffer
Starting background process RVWR
Tue Mar 17 07:48:43 2026
RVWR started with pid=20, OS id=26090
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE MOUNT
Tue Mar 17 07:48:44 2026
flashback database to restore point AUTOUPGRADE_9212_PROD112040
Flashback Restore Start
Flashback Restore Complete
Flashback Media Recovery Start
started logmerger process
Parallel Media Recovery started with 2 slaves
Flashback Media Recovery Log /u01/app/oracle/fast_recovery_area/PROD/archivelog/2026_03_17/o1_mf_1_4_nvkcxbtw_.arc
Tue Mar 17 07:48:52 2026
Incomplete Recovery applied until change 960766 time 03/17/2026 07:04:17
Flashback Media Recovery Complete
Completed: flashback database to restore point AUTOUPGRADE_9212_PROD112040
Tue Mar 17 07:48:52 2026
alter database open resetlogs
RESETLOGS after incomplete recovery UNTIL CHANGE 960766
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.