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

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

          常用鏈接

          留言簿

          隨筆分類(66)

          隨筆檔案(79)

          相冊

          收藏夾(11)

          搜索

          •  

          積分與排名

          • 積分 - 53884
          • 排名 - 945

          最新隨筆

          最新評論

          閱讀排行榜

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

          FeedBack:
          # re: oracle多版本(multi version) 閃回(flashback)實例 2009-03-24 22:59 donnie
          oracle編程藝術 p22  回復  更多評論
            
          主站蜘蛛池模板: 昭平县| 将乐县| 界首市| 含山县| 中方县| 松江区| 茂名市| 泾川县| 和林格尔县| 汉寿县| 集贤县| 临高县| 临桂县| 翁源县| 斗六市| 五峰| 安西县| 绥宁县| 邓州市| 泰安市| 克山县| 永宁县| 黄梅县| 修水县| 车致| 韶山市| 壶关县| 河池市| 临邑县| 香港 | 体育| 南澳县| 永泰县| 布尔津县| 泾川县| 龙井市| 沿河| 漠河县| 吉水县| 阳西县| 昭通市|