首页 > 数据库 > Oracle > Oracle中的SCN
SQL> run
1 select max(ktuxescnw * power(2, 32) + ktuxescnb) scn from x$ktuxe
2 union all
3 SELECT dbms_flashback.get_system_change_number FROM dual
4 union all
5 select current_scn from v$database
6 union all
7* select checkpoint_change# from v$database
SCN
----------
963248 ――――――――――――//计算出来的是已经结束的最新的事务的commit scn
963255 ――――――――――――//获取的当前SCN-1
963256 ――――――――――――//数据库当前SCN,始终最大
955260 ――――――――――――//检查点完成后的SCN
[@more@]函数power(2,32) 意思是得到2的32次方。
SQL>
SQL> select power(2,32) num from dual;
NUM
----------
4294967296
SQL>
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/60144/viewspace-1024312/ ,如需转载,请注明出处,否则将追究法律责任。