Enable Flashback in an Oracle 10g
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 :
- Logon to the database host.
- Change to the user that runs the instance.
- Set ORACLE_SID environment variable to the database SID.
- Login using SQL*Plus as sys with sysdba rights.
- 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.