--查看当前SCN数值
SELECT dbms_flashback.get_system_change_number from dual;
--Scn与时间的对应关系
SELECT to_char(sysdate,’yyyy-mm-dd hh24:mi:ss’, to_char(DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER) AS ?SCN ? from dual;
--通过时间flashback query数据
SELECT * FROM scott.test AS OF TIMESTAMP TO_TIMESTAMP('2013-11-17 10:25:17', 'YYYY-MM-DD HH:MI:SS');?
--通过SCN 闪回数据
SELECT * FROM scott.test AS OF SCN 23565583;
--闪回表中误删除的数据
flashback table tablename to timestamp xxx?
flashback table tablename to scn xxx
--闪回表前提条件
--该表需开启行移动功能,可在恢复之前打开再执行恢复
alter table test enable row movement;
?