Oracle 11g 中的SCN多长时间增加一次


默认情况下,SCN多长时间递增一次呢,今天同事突然讨论这个问题,数据库版本如下:

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
当前的SCN如下:


SQL> select dbms_flashback.get_system_change_number from dual;


GET_SYSTEM_CHANGE_NUMBER
------------------------
                 1544192

 


采用scn_to_timestamp获取scn与时间的对应关系如下:


SQL> select scn_to_timestamp(&scn) from dual;
Enter value for scn: 1544192
old   1: select scn_to_timestamp(&scn) from dual
new   1: select scn_to_timestamp(1544192) from dual

SCN_TO_TIMESTAMP(1544192)
---------------------------------------------------------------------------
28-MAR-12 05.18.36.000000000 PM
将scn递增一次检查时间如下:
SQL> /                           
Enter value for scn: 1544193
old   1: select scn_to_timestamp(&scn) from dual
new   1: select scn_to_timestamp(1544193) from dual

SCN_TO_TIMESTAMP(1544193)
---------------------------------------------------------------------------

28-MAR-12 05.18.39.000000000 PM

如上可见2个时间差为3秒,

可见时间差仍然没变。

相关内容