First, the recovery of the table
to mistakenly deleted the table, as long as not using the Purge permanent deletion option, then recover from the flash back zone hope is very large. General steps are:
1, from the Flash Back query deleted table
SELECT *
from RecycleBin 2, perform table recovery
Flashback table Tbname to Before drop; The tbname here represents the name of the table you want to restore.
second, the table data recovery
to mistakenly delete the table records, as long as there is no TRUNCATE statement, you can choose to restore according to the transaction time of submission, the general steps are:
1, first from the Flashback_transaction_query view query, The view provides fields such as table names, transaction submission times, Undo_sql, and so on for queries. For
Example: SELECT * from Flashback_transaction_query where table_name= ' TEST ';
2, the implementation of the table record recovery
generally first based on the time query, query statement mode for
SELECT * from TB as of timestamp to_timestamp (time, ' 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, the 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 ');
NOTE: ALTER TABLE Testvarchar enable row movement;
The purpose of this command is to allow Oracle to modify the ROWID assigned to the row. In Oracle, when a row is inserted, it is assigned a rowid, and this line always owns the ROWID. The Flash-back table processing completes the delete on the EMP and inserts the rows again, which assigns a new rowid to the lines. Oracle must be allowed to perform this operation to support Flash-back