Pages

Thursday, September 23, 2010

Flashback Database

Flashback Database:


Flashback Database and Restore Points are two related data protection features of Oracle that provide more efficient alternatives to point-in-time recovery for reversing unwanted database changes
create a normal restore point:
SQL> CREATE RESTORE POINT before_truncate;
Restore point created.
OR
create a guaranteed restore point:
SQL> CREATE RESTORE POINT before_truncate GUARANTEE FLASHBACK DATABASE;
Restore point created.

Verify by Querying
 
SELECT NAME, SCN, TIME, DATABASE_INCARNATION#,
        GUARANTEE_FLASHBACK_DATABASE,STORAGE_SIZE
        FROM V$RESTORE_POINT;


Example
 
 A table is truncated after creation of restore point 
 
e.g          truncate table emp;
 
we will perform following step to bring table data back.
 
1.SHUTDOWN DATABASE
2.STARTUP MOUNT EXCLUSIVE
3.FLASHBACK DATABASE TO restore point before_truncate


To Drop Restore point:
DROP RESTORE POINT before_truncate

No comments:

Post a Comment