Flashback

From Oracle FAQ

Jump to: navigation, search

Flashback is an Oracle facility to quickly move an entire database or table back to a prior state for recovery purposes. It can also be used to allow users to view data in a database "as it was", at a specified point in the past, even though committed transactions have since been applied.

Contents

History

Flashback was first introduced with Oracle 9i.

Enable database flashback

shutdown immediate;
startup mount;
alter database archivelog;
alter database flashback on;
alter database open;
SELECT flashback_on, log_mode FROM v$database;

DBMS_FLASHBACK

Example:

execute dbms_flashback.enable_at_time( -
  TO_TIMESTAMP('22-OCT-2007 22:00:00','DD-MON-YYYY HH24:MI:SS'));

Flashback DROP TABLE

To flashback (undrop) a table in the recycle bin:

FLASHBACK TABLE emp TO BEFORE DROP;


Glossary of Terms
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
Personal tools