日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Oracle10g中current_scn的正確計(jì)算運(yùn)行

以下的文章主要向你解答Oracle10g中的current_scn是如何正確的計(jì)算運(yùn)行,我們大家都知道Oracle10g在v$database 視圖里引入了current_scn,其實(shí)這個(gè)SCN是來自底層表,代表當(dāng)前的SCN。

在Oracle9i中我們可以通過dbms_flashback.get_system_change_number來獲得系統(tǒng)的SCN。

但是注意current_scn還是有所不同的,我們看一下一個(gè)查詢:

復(fù)制代碼

 
 
 
  1. oracle@danaly ~]$ sqlplus '/ as sysdba'   
  2. SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 21 10:15:08 2007  
  3. Copyright (c) 1982, 2005, Oracle. All rights reserved.  
  4. Connected to:  
  5. Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production  
  6. With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options  
  7. SQL> @scn  
  8. SQL> col current_scn for 99999999999999999  
  9. SQL> select current_scn from v$database;  
  10. CURRENT_SCN  
  11. 8910961765228  
  12. SQL> select dbms_flashback.get_system_change_number current_scn from dual;  
  13. CURRENT_SCN  
  14. 8910961765228  
  15. SQL> select dbms_flashback.get_system_change_number current_scn from dual;  
  16. CURRENT_SCN  
  17. 8910961765228  
  18. SQL> select current_scn from v$database;  
  19. CURRENT_SCN  
  20. 8910961765229  
  21. SQL> select dbms_flashback.get_system_change_number current_scn from dual;  
  22. CURRENT_SCN  
  23. 8910961765229  
  24. SQL> select dbms_flashback.get_system_change_number current_scn from dual;  
  25. CURRENT_SCN  
  26. 8910961765229  
  27. SQL> select current_scn from v$database;  
  28. CURRENT_SCN  
  29. 8910961765230  

我們看到current_scn的查詢會(huì)直接導(dǎo)致SCN的增進(jìn),而其他方式并不會(huì)。也就是說在這里的current_scn就像是一個(gè)Sequence一樣,查詢會(huì)導(dǎo)致增進(jìn)。這也很好理解,v$database只能通過增進(jìn)當(dāng)前的SCN才能保證獲得的SCN是Current的??墒侨绻徊樵兡??這個(gè)值肯定是不會(huì)增長的。以上的相關(guān)內(nèi)容就是對Oracle10g的current_scn計(jì)算的介紹,望你能有所收獲。


本文題目:Oracle10g中current_scn的正確計(jì)算運(yùn)行
網(wǎng)站地址:http://m.5511xx.com/article/djggicd.html