收集在不同的 Oracle 版本中取得當前 SCN 的方法:
8i
select max(ktuxescnw * power(2, 32) + ktuxescnb) from x$ktuxe;
9i
select max(ktuxescnw * power(2, 32) + ktuxescnb) from x$ktuxe;
select dbms_flashback.get_system_change_number from dual;
10G
select max(ktuxescnw * power(2, 32) + ktuxescnb) from x$ktuxe;
select dbms_flashback.get_system_change_number from dual;
SELECT current_scn FROM   v$database;
select timestamp_to_scn(SYSDATE) from dual;