Oracle 9I FlashBack 測試

ysjxjf發表於2006-07-05
Oracle 9I FlashBack 測試[@more@]
15:08:22 SQL> execute DBMS_flashback.ENABLE_AT_TIME(to_date('2003-05-16 15:00:00'));

PL/SQL procedure successfully completed.

15:09:02 SQL> select * from t;

A

----------

gototop





15:16:43 SQL> execute DBMS_flashback.DISABLE;

PL/SQL procedure successfully completed.
-----------------------------------------------------------------------
15:38:57 SQL> declare

15:39:28 2 cursor flash_recover is

15:39:28 3 select * from t;

15:39:28 4 t_recode t%rowtype;

15:39:28 5 begin

15:39:28 6 DBMS_flashback.ENABLE_AT_TIME(to_date('2003-05-16 15:37:23'));

15:39:28 7 open FLASH_RECOVER;

15:39:28 8 DBMS_flashback.DISABLE;

15:39:28 9 loop

15:39:28 10 FETCH FLASH_RECOVER INTO t_recode;

15:39:28 11 EXIT WHEN FLASH_RECOVER%NOTFOUND;

15:39:28 12 insert into t values (t_recode.a);

15:39:28 13 end loop;

15:39:28 14 CLOSE FLASH_RECOVER;

15:39:28 15 commit;

15:39:28 16 end;

15:39:28 17 /

PL/SQL procedure successfully completed.

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

相關文章