常用的sql语句--关于10g 闪回的
select name,FIRST_CHANGE# fscn,NEXT_CHANGE# nscn,FIRST_TIME from v$archived_log
-- 当前的 scn
select dbms_flashback.get_system_change_number fscn from dual;
--- 根据 时间 查 scn
select timestamp_to_scn(to_timestamp('2010-05-20 11.11:11','yyyy-mm-dd hh24:mi:ss')) scn from dual;
-- 获取 时间 --SCN 对应关系
SELECT * from sys.smon_scn_time sss ORDER BY sss.TIME_DP DESC
--- 直接闪回表
insert into t_cao select * from WFRT_TASK_LIST as of scn 10115272238359;
select count(*) from WFRT_TASK_LIST AS OF SCN 10112510346429
-- 启动行移动功能
alter table WFRT_TASK_LIST enable row movement;
-- 根据scn 闪回表
flashback TABLE WFRT_TASK_LIST to scn 10112510346429