Search code examples
oracle-databaseoracle11getltalend

Oracle ora_rowscn to get delta


ora_rowscn as definition from oracle,

You cannot use this pseudocolumn in a query to a view

so can I use the ora_rowscn column to get the delta and updated data from the oracle table in my ETL job?


Solution

  • Unfortunately even if you use ROWDEPENDENCIES you can hardly rely on SCN - for replication purposes. There are situations where SCN can change or is generated at COMMIT time.

    ORA_ROWSCN Pseudocolumn

    For each row, ORA_ROWSCN returns the conservative upper bound system change number (SCN) of the most recent change to the row. This pseudocolumn is useful for determining approximately when a row was last updated. It is not absolutely precise, because Oracle tracks SCNs by transaction committed for the block in which the row resides.

    Search for "delayed block clean out"