基本閃回查詢和閃回表

壹頁書發表於2015-05-26
參考:
http://blog.csdn.net/leshami/article/details/6112607

基本閃回查詢
select * from t1
as of timestamp to_timestamp('2015-05-26 22:04:08','yyyy-mm-dd hh24:mi:ss');
或者
select * from t1
as of timestamp current_timestamp - interval '15' minute;

查詢誤刪除的資料
select * from t1
as of timestamp to_timestamp('2015-05-26 22:04:08','yyyy-mm-dd hh24:mi:ss')minus
select * from t1;

將會話設定在固定的時間
execute dbms_flashback.enable_at_time(to_timestamp('2015-05-26 22:04:08','yyyy-mm-dd hh24:mi:ss'));

execute dbms_flashback.disable;


閃回表
alter table t1 enable row movement;
alter table t2 enable row movement;
flashback table t1,t2 to timestamp to_timestamp('2015-05-26 22:35:08','yyyy-mm-dd hh24:mi:ss');
flashback table t1,t2 to timestamp current_timestamp- interval '10' minute;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29254281/viewspace-1673034/,如需轉載,請註明出處,否則將追究法律責任。

相關文章