如何查看Oracle當前的SCN呢?
SQL> select current_scn,scn_to_timestamp(current_scn) ,timestamp_to_scn(sysdate)
from v$database ;
CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) T IMESTAMP_TO_SCN(SYSDATE)
----------- -------------------------------------------------------------------- ------- -------------------------
4170959 03-MAR-10 09.30.34.000000000 AM 4170958
SQL> l
1 select current_scn,scn_to_timestamp(current_scn) ,timestamp_to_scn(sysdate)
2* from v$database
SQL> /
CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) TIMESTAMP_TO_SCN(SYSDATE)
----------- --------------------------------------------------------------------------- -------------------------
4170969 03-MAR-10 09.31.01.000000000 AM 4170968
SQL> /
CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) TIMESTAMP_TO_SCN(SYSDATE)
----------- --------------------------------------------------------------------------- -------------------------
4170983 03-MAR-10 09.31.22.000000000 AM 4170982
SQL> /
CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) TIMESTAMP_TO_SCN(SYSDATE)
----------- --------------------------------------------------------------------------- -------------------------
4170986 03-MAR-10 09.31.28.000000000 AM 4170985
SQL> /
CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) TIMESTAMP_TO_SCN(SYSDATE)
----------- --------------------------------------------------------------------------- -------------------------
4170988 03-MAR-10 09.31.31.000000000 AM 4170987
SQL> /
CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) TIMESTAMP_TO_SCN(SYSDATE)
----------- --------------------------------------------------------------------------- -------------------------
4170991 03-MAR-10 09.31.37.000000000 AM 4170990
SQL> /
CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) TIMESTAMP_TO_SCN(SYSDATE)
----------- --------------------------------------------------------------------------- -------------------------
4171182 03-MAR-10 09.34.25.000000000 AM 4171177
SQL> /
CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) TIMESTAMP_TO_SCN(SYSDATE)
----------- --------------------------------------------------------------------------- -------------------------
4171184 03-MAR-10 09.34.31.000000000 AM 4171184
SQL> /
CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) TIMESTAMP_TO_SCN(SYSDATE)
----------- --------------------------------------------------------------------------- -------------------------
4171187 03-MAR-10 09.34.34.000000000 AM 4171186
current_scn與 convert以後的sysdate,不一定對應的。
繼續研究
没有评论:
发表评论