Oracle 10g and subsequent versions offer the ability to show the database as it existed at a previous point in time, or as of a specific system change number (SCN). Unlike Flashback Query, introduced with Oracle 9i, Flashback Database requires a separate Flash Recovery Area, pointed to by the new initialization parameter DB_RECOVERY_FILE_DEST.
In order for Flashback Database to be successful, DB_RECOVERY_FILE_DEST_SIZE and DB_FLASHBACK_RETENTION_TARGET also need to be set. The latter indicates the maximum number of minutes' worth of data to be kept in the Recovery Area.
Hora, on its Redo Logs page, now offers an additional tab sheet that supplies information from some of the new Flashback Data Dictionary views.
The sheet shows a two-part grid, with the top part populated from V$FLASHBACK_DATABASE_STAT, and the bottom from V$FLASHBACK_DATABASE_LOG. In this example, an ALTER DATABASE FLASHBACK ON has just been issued. The database has been open for two minutes, and 1,622,016 bytes of flashback data and 154,112 bytes of redo data have been written. The log shows that if a flashback is needed later, data will be available beginning with SCN 1,636,504 beginning at 16:01:40.
Example for enabling flashback:
sqlplus sys as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter system set DB_FLASHBACK_RETENTION_TARGET=4320;
SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=536870912;
SQL> alter system set DB_RECOVERY_FILE_DEST='/u02/fra';
SQL> alter database flashback on;
SQL> alter database open;