How to enable the Flashback Database feature

Flashback Database allows you to quickly revert the entire database to its state as of a previous
point in time. Rather than restoring an older copy of each datafile and performing incomplete
recovery, the starting point is the present and recent changes are backed out of the database.

 Whenever Flashback Database is enabled, the new background process RVWR (RECOVERY WRITER) is started in order to write data from the flashback buffer in the System Global Area (SGA) to flashback logsin the flash recovery area. The flashback buffer – a  part of the SGA – depends on the sizing of the log buffer, once more it is recommended for databases with high transactional activity to have an appropriate log buffer sizing.
Here we discuss how  to turn on the flashback feature:

SQL> select flashback_on from v$database;


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount exclusive;
ORACLE instance started.

Total System Global Area   209715200 bytes
Fixed Size                                    788524 bytes
Variable Size                               162887636 bytes
Database Buffers                       41943040 bytes
Redo Buffers                                4096000 bytes
Database mounted.
SQL> alter database flashback on;
Database altered.

SQL> select flashback_on from v$database;


SQL> alter database open;
Database altered.

Let’s check the parameter associated with  the  flashback,

db_flashback_retention_target which is in  minutes ..

SQL> show parameter db_flashback_retention_target

———————————— ———————————

db_flashback_retention_target integer

Let us alter this retention target. This retention target is a retention goal , however not a guaranteed interval. Flashback logs are generated in the flash recovery area, the physical destination is set with db_recovery_file_dest and the maximum size can be controlled with db_recovery_file_dest_size. In periods of peak load the flashback logs are reused and the retention period might decrease. As well rman backups -if taken to disk- are by default written in the flash recovery area, as such an appropriate sizing of the db_recovery_file_dest_size need to be supervised.
SQL> alter system set db_flashback_retention_target=2880 scope=both;
System altered.


One thought on “How to enable the Flashback Database feature

  1. Hi,

    Do you think what is the internal mechanisam uses after enabling flashback database? I have seen that Oracle uses RMAN for keep tracking all flashback feature in database. While we enabling Database flashback, internally Oracle configures RMAN.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s