zoukankan      html  css  js  c++  java
  • SCN试验之二 checkpoin scn 与数据库scn的关系

    oracle11g

    观察数据库scn:

    SQL> select dbms_flashback.get_system_change_number from dual;

    GET_SYSTEM_CHANGE_NUMBER
    ------------------------
                     1025713

    SQL> select checkpoint_change# from v$database;

    CHECKPOINT_CHANGE#
    ------------------
               1022214

    SQL>

    ********************************

    强制执行checkpoint:

    SQL> alter system checkpoint;

    System altered.

    SQL> select checkpoint_change# from v$database;

    CHECKPOINT_CHANGE#
    ------------------
               1025732
    可以看到,此时 checkpoint_change# 比刚才的数据库scn 要大一些。这是因为数据库scn 随着时间的增长而增长。

    SQL> select dbms_flashback.get_system_change_number from dual;

    GET_SYSTEM_CHANGE_NUMBER
    ------------------------
                     1025755

    SQL> alter system checkpoint;

    System altered.

    SQL>

    SQL> select checkpoint_change# from v$database;

    CHECKPOINT_CHANGE#
    ------------------
               1025765

    SQL> select name, checkpoint_change# from v$datafile;      

    NAME
    --------------------------------------------------------------------------------
    CHECKPOINT_CHANGE#
    ------------------
    /u01/app/oracle/oradata/orcl/system01.dbf
               1025765

    /u01/app/oracle/oradata/orcl/sysaux01.dbf
               1025765

    /u01/app/oracle/oradata/orcl/undotbs01.dbf
               1025765


    NAME
    --------------------------------------------------------------------------------
    CHECKPOINT_CHANGE#
    ------------------
    /u01/app/oracle/oradata/orcl/users01.dbf
               1025765

    /u01/app/oracle/oradata/orcl/example01.dbf
               1025765


    SQL> select name, checkpoint_change# from v$datafile_header;

    NAME
    --------------------------------------------------------------------------------
    CHECKPOINT_CHANGE#
    ------------------
    /u01/app/oracle/oradata/orcl/system01.dbf
               1025765

    /u01/app/oracle/oradata/orcl/sysaux01.dbf
               1025765

    /u01/app/oracle/oradata/orcl/undotbs01.dbf
               1025765


    NAME
    --------------------------------------------------------------------------------
    CHECKPOINT_CHANGE#
    ------------------
    /u01/app/oracle/oradata/orcl/users01.dbf
               1025765

    /u01/app/oracle/oradata/orcl/example01.dbf
               1025765


    SQL>

  • 相关阅读:
    相遇相知都是缘
    [BTS]6912,5641,5773,5410错误处理!
    [BTS]Cumulative Functloids用法
    职业生涯又一个转折点
    BizTalk Group Day 北京!
    [BTS]10008错误如何处理?
    [ERROR]创建BAM视图时报错
    [BTS]使用BizTalk开发应用系统,就是这么简单!
    [BTS]BizTalk2006 SqlAdapter UpdateGram的Update用法
    [BTS]为什么BTSharePointAdapterWS.asmx无法预览?
  • 原文地址:https://www.cnblogs.com/gaojian/p/3663959.html
Copyright © 2011-2022 走看看