Search This Blog


Calculating Oracle database SCN

Database SCN (System Change Number)

Oracle 8i and before: select max(ktuxescnw*power(2, 4 * 8)+ktuxescnb) from x$ktuxe;

Oracle 9i and after: select dbms_flashback.get_system_change_number from dual;

2^(4*8) is to shift ktuxescnw to left 4 bytes (or double word). It is the internal integer bit width (32-bit). I have not tested this across various mid-range server to confirm it

No comments: