Pages

Tuesday, February 16, 2016

Finding current SCN of a database

Finding current SCN of a database

There are two ways to get the current SCN (System Change Number) for an oracle 10g and 11g database
DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER and V$database

Method 1:Using DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER function

SQL>SELECT TO_CHAR(dbms_flashback.get_system_change_number) FROM dual;

GET_SYSTEM_CHANGE_NUMBER
----------------------------------------
   11626841778005

Method 2:Using current_scn column from v$database;

SQL> SELECT TO_CHAR(CURRENT_SCN) FROM V$DATABASE;

CURRENT_SCN
--------------------
11626841778008

No comments:

Post a Comment