Collected posts: Oracle, SQL, PL/SQL, Performance, Security...(More than 300 blogs)

dimanche 1 février 2015

How to get Oracle system change number (SCN) ?




The SYSTEM CHANGE NUMBER = A stamp that defines a committed version of a database at a point in time. Oracle assigns every committed transaction a unique SCN.
USER_A@MYDB 01022015 09:24:45> SELECT CURRENT_SCN FROM V$DATABASE;

CURRENT_SCN
-----------
    2544927


USER_A@MYDB 01022015 09:24:46> SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL;

GET_SYSTEM_CHANGE_NUMBER
------------------------
                 2544927


The User_A should have the privileges execute on DBMS_FLASHBACK and SELECT on V_$DATABASE




Aucun commentaire:

Enregistrer un commentaire