闪回操作前启用行移动功能
Sql代码
alter table emp enable row movement;
执行闪回语句:
Sql代码
flashback table emp to timestamp to_timestamp('20120709195000','YYYYMMDDHH24:MI:SS');
2闪回回收站:
Java代码
SQL>show recyclebin;
SQL>drop table emp;
SQL>show recyclebin;
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
EMP BIN$b+XkkO1RS5K10uKo9BfmuA==$0 TABLE 2012-11-07:15:30:47
SQL>flashback table emp to before drop;或
SQL>flashback table "BIN$b+XkkO1RS5K10uKo9BfmuA==$0" to before drop;
清理回收站:
清除回收站中的单个表:purge table emp
清除整个回收站:purge recyclebin
清除不同的对象回收站:purge user_recyclebin或purge dba_recyclebin
彻底删除一个table: SQL>drop table emp purge; --表不能被恢复了。
3闪回事物查询:
Sql代码
select * from flashback_transaction_query where TABLE_NAME= 'EMP'