1.7 Oracle Flashback Technology: Alternatives to Point-in-Time Recovery

Oracle Flashback Technology provides a set of features that provide useful alternatives to support viewing past states of data, and winding data back and forth in time, without requiring you to restore large portions of your database from backup or perform point-in-time recovery. The flashback features of Oracle are more efficient and less disruptive than media recovery in most circumstances in which they are applicable.

Most of the flashback features of Oracle operate at the logical level, viewing and manipulating database objects, as follows:

  • Oracle Flashback Query lets you specify a target time and then run queries against your database, viewing results as they would have appeared at that time. To recover from an unwanted change like an erroneous update to a table, a user could choose a target time before the error and run a query to retrieve the contents of lost or changed rows.

  • Oracle Flashback Version Query lets you view all the versions of all the rows that ever existed in one or more tables in a specified time interval, as updates were applied to the tables. You can also retrieve metadata about the differing versions of the rows, including start time, end time, operation, and transaction ID of the transaction that created the version. This feature can be used both to recover lost data values and to audit changes to the tables queried.

  • Oracle Flashback Transaction Query lets you view changes made by a single transaction, or by all the transactions during a period of time.

  • Oracle Flashback Table returns a table to its state at a previous point in time. You can restore table data while the database is online, undoing changes only to the specified table.

  • Oracle Flashback Drop reverses the effects of a DROP TABLE statement.

Flashback Table, Flashback Query, Flashback Transaction Query and Flashback Version Query all rely on undo data, records of the effects of each update to an Oracle database and values overwritten in the update. Used primarily for such purposes as providing read consistency for SQL queries and rolling back transactions, these undo records contain the information required to reconstruct data as it stood at a past time and all changes since that time.

Flashback Drop is built around a mechanism called the Recycle Bin, which Oracle uses to manage dropped database objects until the space they occupied is needed to store new data.


The logical-level flashback features of Oracle are not dependent upon RMAN, and are available whether or not RMAN is part of your backup strategy.

At the physical level, Oracle Flashback Database provides a more efficient direct alternative to database point-in-time recovery. If you have datafiles which merely have unwanted changes, then you can use Flashback Database to cause your current datafiles revert to their contents at a past time. The end product is much like the result of a point-in-time recovery, but is generally much faster because it does not require restoring datafiles from backup, and requires only limited application of redo compared to media recovery.

Flashback Database uses flashback logs to access past versions of data blocks, as well as some information from the archived redo log. Flashback Database requires that you configure a flash recovery area for your database, because the flashback logs can only be stored there. Flashback logging is not enabled by default. Space used for flashback logs is managed automatically by the database, and balanced against space required for other files in the flash recovery area.


  • Flashback Database is integrated with RMAN, which can automatically retrieve from backup any archived logs needed during Flashback Database. It can also be used from within SQL*Plus without the use of RMAN, but if used in this mode you must make all required archived logs available on disk yourself.

  • If insufficient space is allocated for the flash recovery area, then flashback logs may be deleted to make room for backups and archived log files. Database point-in-time recovery can generally deliver the same result as flashback database, returning your database to its contents at a past point in time,

1.7.1 About Restore Points

The Oracle database also supports restore points in conjunction with Flashback Database and restore and recovery features.

A normal restore point is an alias corresponding to an SCN, which you can create at any time if you anticipate needing to return part or all of your database to its contents at that time. Future point-in-time recovery, Flashback Table and Flashback Database operations are simplified because you do not need to research or record the target SCN for the operation.

Creating a guaranteed restore point ensures that you can use Flashback Database to return your database to the time of the restore point.

See Also: