System Change Numbers and Flashback Query

How ProvenDB for Oracle integrates with Oracle Flashback and SCNs

ProvenDB for Oracle can create proofs for the current state of the database or for a database point in time. These "point in time" proofs are created when the --includeScn option is specified in the anchor command, or when ProvenDB for Oracle is running in monitor mode.

Point in time proofs require Oracle Flashback to be enabled and can take advantage of Oracle Flashback Data Archive if enabled.

When a point in time proof is created, ProvenDB for Oracle takes note of the current System Change Number (SCN) of the database. Table data is retrieved for that SCN, and the key for each rows hash incorporates the SCN. For instance, in a point in time proof, the key for a specific row proof might be:

AAAR5UAAMAAAAVvAAg.4402573

which would specify a proof for RowId AAAR5UAAMAAAAVvAAg and SCN 4402573.

When validating such a proof, ProvenDB for Oracle will attempt to retrieve the RowId for the SCN using a flashback query. This query may fail if Flashback Data Arvchive is not enabled or if the undo_retention period has been exceeded.

📘

Note

Even if Oracle Flashback Data Archive is not enabled a point in time proof might still be useful if the --includeRowid and --validate options were specified when the anchor command was run. In this case, proofs for all rowIds within the proof scope will be exported to the proof file and can be validated independently of the proof.


What’s Next