Flashback
From Oracle FAQ
⧼orafaq-jumptonavigation⧽⧼orafaq-jumptosearch⧽
Flashback is an Oracle database facility to quickly move an entire database or a 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.
History
Flashback was first introduced with Oracle 9i with Oracle's Flashback Query feature.
Oracle 10g added the following features:
- Flashback Database
- Flashback Drop
- Flashback Table
- Flashback Version Query
- Flashback Transaction Query
Oracle 11g added Flashback Transaction and Total Recall (or Flashback Data Archive).
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 | # |