随笔 - 79  文章 - 11  trackbacks - 0
<2009年3月>
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

不再堕落。
Oracle documents: 
http://tahiti.oracle.com/

常用链接

留言簿

随笔分类(66)

随笔档案(79)

相册

收藏夹(11)

搜索

  •  

积分与排名

  • 积分 - 51990
  • 排名 - 952

最新随笔

最新评论

阅读排行榜

scott@ORCL> connect / as sysdba
已连接。
sys
@ORCL> grant execute on dbms_flashback to scott;

授权成功。

sys
@ORCL> connect scott/tiger
已连接。
scott
@ORCL> variable SCN number
scott
@ORCL> exec :scn := sys.dbms_flashback.get_system_change_number

PL
/SQL 过程已成功完成。

scott
@ORCL> print scn

       SCN
----------
    762534

scott
@ORCL> select count(*from emp;

  
COUNT(*)
----------
        14

scott
@ORCL> delete from emp;

已删除14行。

scott
@ORCL> select count(*from emp;

  
COUNT(*)
----------
         0

scott
@ORCL> select count(*from emp AS OF SCN :scn;

  
COUNT(*)
----------
        14

scott
@ORCL> commit;

提交完成。

scott
@ORCL> select *
  
2   from (select count(*from emp),
  
3        (select count(*from emp as of scn :scn)
  
4  /

  
COUNT(*)   COUNT(*)
---------- ----------
         0         14

scott
@ORCL> select *
  
2   from (select count(*from emp),
  
3        (select count(*from emp as of scn :scn)
  
4  /

  
COUNT(*)   COUNT(*)
---------- ----------
         0         14

scott
@ORCL> alter table emp enable row movement;

表已更改。

scott
@ORCL> flashback table emp to scn :scn;

闪回完成。

scott
@ORCL> select *
  
2   from (select count(*from emp),
  
3        (select count(*from emp as of scn :scn)
  
4  /

  
COUNT(*)   COUNT(*)
---------- ----------
        14         14

scott
@ORCL>
posted on 2009-03-24 22:58 donnie 阅读(295) 评论(1)  编辑  收藏 所属分类: database

FeedBack:
# re: oracle多版本(multi version) 闪回(flashback)实例 2009-03-24 22:59 donnie
oracle编程艺术 p22  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: