oracle闪回flashback_transaction_query知识点

查询更新记录:

select t.start_timestamp,
       t.commit_timestamp,
       t.logon_user,
       t.operation,
       t.table_name,
       t.table_owner,
       t.undo_sql
from flashback_transaction_query t
 where table_name = 'EMP';

查询N分钟前的数据:

select *
  from emp as of timestamp to_timestamp('当前时间-N', 'yyyy-mm-dd hh24:mi:ss');

恢复N分钟前的数据:

alter table emp enable row movement;
flashback table emp to timestamp to_timestamp('当前时间-N', 'yyyy-mm-dd hh24:mi:ss');

恢复删除的表:

flashback table emp to before drop;

查看哪些表可以被恢复:

select * from user_recyclebin;

 

posted @ 2013-12-27 17:40  我爱java2013  阅读(411)  评论(0编辑  收藏  举报