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>
本文轉自健哥的數據花園博客園博客,原文鏈接:http://www.cnblogs.com/gaojian/p/3663959.html,如需轉載請自行聯系原作者
總結
以上是生活随笔為你收集整理的SCN试验之二 checkpoin scn 与数据库scn的关系的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MySQL数据库的sql语句的导出与导入
- 下一篇: 【Maven实战】之生成项目站点