恢復被delete的數據
查看系統當前時間
--獲得系統當前時間 select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual; |
查看刪除數據之前的某個時間點該表裏面的數據
select * from table_delete as of timestamp to_timestamp('2015-12-18 17:16:00','yyyy-mm-dd hh24:mi:ss'); |
如果這個時間點裏面有被刪除的數據,則恢復數據到這個時間
flashback table table_delete totimestamp to_timestamp('2015-12-18 17:16:00','yyyy-mm-dd hh24:mi:ss'); |
如果出現
則執行
alter table table_delete enable row movement; |
如果出現
恢復被truncate的表
查看回收站
select * from user_recyclebin order by droptime desc ; |
恢復
flashback table testtruncate to before drop; |
或者
flashback table "BIN$KdgUA10bBhngUwEAAH8dOA==$0" to before drop rename to newName; |
注意:表名用雙引號