Flashback Database

 

With the flashback database feature, the hours-long restore-recover process can be completed in a few minutes. You can roll back and open your database to a specific time. It is better to use Flashback database feature to restore user errors (truncate table v.s.) rather than physical problems.

The Flashback database property is turned off by default. It is necessary to set the FLASHBACK_ON property to turn this feature on.

It is also necessary to specify how far you will be back by using the DB_FLASHBACK_RETENTION_TARGET parameter.

The default value of the DB_FLASHBACK_RETENTION_TARGET parameter is 1440 minutes (one day). You should first activate Flashback Recovery Area for your database.

You need to set the DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE parameters for the Flashback Recovery Area.

Flashback status of your database:

 

There are three different states for Flashback_on.
yes: The flashback database feature is running.
no: Flashback database feature is turned off.
restore point only: Only active for flashback guaranteed restore points.

* Another important point is that the database should be running in archivelog mode.

 

With the command below, you can see the archive mode of your database.

 

Steps to activate the Flashback Database feature:

For 10g:

 

For 11g:

 

We can do the Flashback database process in 3 ways.

1) SCN
2) RESTORE POINT
3) DATE

You can access the current SCN information of your database with the help of the following script;

 

Create Restore Point:

 

To access the created restore point information:

 

Example :

The following steps can be used to return our database back to a specific SCN.

 

Flashback database commands should be run when your database is in mount mode.

After the flashback database process is finished, you must open the database with the command

 

You can find the space required for the Flashback Database logs by the following query:

 

By default, flashback logs are created in all permanent tablespaces.

If you want to close:

 

If you want to open again:

dbtut
Author: dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *