Use of System Change Number (SCN)

ora2pgpro is able to export data as of a specific SCN. You can set it at command line using the -S or --scn option. You can give a specific SCN or if you want to use the current SCN at first connection time set the value to current. In this last case, the connection user has the SELECT ANY DICTIONARY or the SELECT_CATALOG_ROLE role, the current SCN is looked at the v$database view.

ora2pgpro -c ora2pgpro.conf -t COPY --scn 16605281

This adds the following clause to the query used to retrieve data for example:

AS OF SCN 16605281

You can also use the --scn option to use the Oracle flashback capabality by specifying a timestamp expression instead of a SCN.

ora2pgpro -c ora2pgpro.conf -t COPY --scn "TO_TIMESTAMP('2021-12-01 00:00:00', 'YYYY-MM-DD HH:MI:SS')"

This will add the following clause to the query used to retrieve data:

AS OF TIMESTAMP TO_TIMESTAMP('2021-12-01 00:00:00', 'YYYY-MM-DD HH:MI:SS')

Or for example to only retrive yesterday's data:

ora2pgpro -c ora2pgpro.conf -t COPY --scn "SYSDATE - 1"
pdf