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

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

          常用鏈接

          留言簿

          隨筆分類(66)

          隨筆檔案(79)

          相冊

          收藏夾(11)

          搜索

          •  

          積分與排名

          • 積分 - 53558
          • 排名 - 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  回復  更多評論
            
          主站蜘蛛池模板: 常德市| 渑池县| 望都县| 合作市| 井陉县| 金坛市| 济阳县| 大邑县| 衡山县| 枣阳市| 辽阳县| 丰宁| 桂林市| 宜昌市| 山西省| 罗源县| 克什克腾旗| 溧水县| 尼勒克县| 花莲市| 灌阳县| 离岛区| 柳河县| 湘阴县| 泽普县| 呼图壁县| 上杭县| 宣威市| 车致| 英吉沙县| 阿巴嘎旗| 大悟县| 乐安县| 通许县| 信丰县| 赣州市| 浦东新区| 泊头市| 申扎县| 清远市| 吉林省|