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

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

          常用鏈接

          留言簿

          隨筆分類(66)

          隨筆檔案(79)

          相冊

          收藏夾(11)

          搜索

          •  

          積分與排名

          • 積分 - 53502
          • 排名 - 949

          最新隨筆

          最新評論

          閱讀排行榜

          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 閱讀(312) 評論(1)  編輯  收藏 所屬分類: database

          FeedBack:
          # re: oracle多版本(multi version) 閃回(flashback)實例 2009-03-24 22:59 donnie
          oracle編程藝術 p22  回復  更多評論
            
          主站蜘蛛池模板: 漠河县| 黔西| 工布江达县| 凤阳县| 同德县| 丰镇市| 桐柏县| 四川省| 朝阳区| 庆城县| 甘肃省| 武胜县| 永春县| 扎鲁特旗| 永寿县| 英山县| 松桃| 临高县| 兴安盟| 汤阴县| 晋中市| 和平县| 新和县| 达拉特旗| 崇阳县| 平南县| 江达县| 宁陕县| 天祝| 景东| 布尔津县| 固阳县| 酉阳| 呼和浩特市| 磐安县| 苏州市| 鄂托克旗| 博野县| 岗巴县| 东安县| 交口县|