Enable Flashback in an Oracle 10g

by Brother OMara
by Brother O'Mara

One of the cool new features of Oracle 10g is Flasback.
Flashback Database quickly rewinds an Oracle database to a previous point in time to correct any problems caused by logical data corruptions or user errors. Flashback Database is like a “rewind button” for your database. It is similar to conventional point-in-time recovery in its effects: it allows you to return a database to its state at a time in the recent past. However, it eliminates the time required to restore backup files.”
To enable flashback on your 10g database is fairly simple.
Here’s how to enable flashback :

  1. Logon to the database host.
  2. Change to the user that runs the instance.
  3. Set ORACLE_SID environment variable to the database SID.
  4. Login using SQL*Plus as sys with sysdba rights.
  5. Run the following SQL commands.

SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT EXCLUSIVE;
SQL> ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=2880 SCOPE=BOTH;
SQL> ALTER DATABASE FALSHBACK ON;
SQL> ALTER DATABASE OPEN;

You may want to read up on the DB_FLASHBACK_RETENTION_TARGET setting here and here to make sure it is suitable for your environment.

Leave a Reply

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