recover data that was delete
Suppose the table name is: Table_delete
View System Current time
--Get the system current time Select To_char (sysdate, ' Yyyy-mm-dd hh24:mi:ss ') from dual; |
View the data in this table at a point in time before deleting data
SELECT * from Table_delete as of timestamp to_timestamp (' 2015-12-18 17:16:00 ', ' yyyy-mm-dd hh24:mi:ss '); |
If there are deleted data at this point in time, then restore the data to this time
Flashback table Table_delete Totimestamp to_timestamp (' 2015-12-18 17:16:00 ', ' yyyy-mm-dd hh24:mi:ss '); |
If you appear
the execution
ALTER TABLE table_delete enable row movement; |
If you appear
because the table is truncate, the method is invalid
Restore the table that was truncate
Suppose the table name that is deleted is: Testtruncate
View Recycle bin
SELECT * from User_recyclebin ORDER by droptime Desc; |
Recovery
Flashback table Testtruncate to before drop; |
or
Flashback table "Bin$kdgua10bbhnguweaah8doa==$0" to before drop rename to NewName; |
Note: Double quotes for table names