methods for Oracle to recover deleted tables or table records
article Category: Database
One: Recovery of tables
For accidentally deleted tables, as long as you do not use the Purge permanent deletion option, then recover from the flash back zone hope is very large. The general steps are:
1, from the Flash Back query deleted table
SELECT * FROM RecycleBin
2. Recovery of the execution table
Flashback table TB to before drop, where TB represents the name of the table you want to restore.
Second: Table Data recovery
For the mistakenly deleted table records, as long as there is no TRUNCATE statement, you can choose to restore the transaction according to the time of submission, the general steps are:
1, first from the Flashback_transaction_query view query, the view provided for the query table name, transaction submission time, Undo_sql and other fields.
For example: SELECT * from Flashback_transaction_query where table_name= ' TEST ';
2, the implementation of the table record recovery
Generally, queries are based on time, and the query statement mode is SELECT * from TB as of Timestamp to_timestamp (times, ' Yyyy-mm-dd hh24:mi:ss '); TB refers to the table name, time refers to a point
such as SELECT * from Scott.test as of timestamp to_timestamp (' 2009-12-11 20:53:57 ', ' yyyy-mm-dd hh24:mi:ss ');
If there is data, recovery is extremely simple, the statement is Flashback table TB to timestamp to_timestamp (time, ' yyyy-mm-dd hh24:mi:ss ');
such as flashback table Scott.test to timestamp to_timestamp (' 2009-12-11 20:47:30 ', ' yyyy-mm-dd hh24:mi:ss ');