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

Advertisements
Previous Post
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: