日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

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

新聞中心

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

以下的文章主要向你解答Oracle10g中的current_scn是如何正確的計算運行,我們大家都知道Oracle10g在v$database 視圖里引入了current_scn,其實這個SCN是來自底層表,代表當前的SCN。

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

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

復制代碼

 
 
 
  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的查詢會直接導致SCN的增進,而其他方式并不會。也就是說在這里的current_scn就像是一個Sequence一樣,查詢會導致增進。這也很好理解,v$database只能通過增進當前的SCN才能保證獲得的SCN是Current的??墒侨绻徊樵兡??這個值肯定是不會增長的。以上的相關內(nèi)容就是對Oracle10g的current_scn計算的介紹,望你能有所收獲。


網(wǎng)頁標題:Oracle10g中current_scn的正確計算運行
鏈接地址:http://www.dlmjj.cn/article/djggicd.html