System Change Number Query Flashbacks : Flashbacks « Transaction « Oracle PL/SQL Tutorial






Flashbacks based on system change numbers (SCNs) can be more precise than those based on a time, because the database uses SCNs to track changes.

SQL> VARIABLE current_scn NUMBER
SQL> EXECUTE :current_scn := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER();

PL/SQL procedure successfully completed.

SQL> PRINT current_scn

CURRENT_SCN
-----------
    5547739

SQL>








35.6.Flashbacks
35.6.1.Query Flashbacks
35.6.2.Granting the Privilege for Using Flashbacks
35.6.3.Time Query Flashbacks
35.6.4.To disable a flashback, you execute DBMS_FLASHBACK.DISABLE()
35.6.5.System Change Number Query Flashbacks
35.6.6.DBMS_FLASHBACK.ENABLE_AT_SYSTEM_CHANGE_NUMBER() procedure enables you to perform a flashback to an SCN.