Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Harsha.

Asked: September 16, 2020 - 8:35 am UTC

Last updated: October 08, 2020 - 2:31 am UTC

Version: 12c

Viewed 1000+ times

You Asked

I am capturing audit of tables in oracle 12c db and putting them in 18c using goldengate.
We are trying to build something similar to what flashback data archive provides.
We can't use FDA as it was causing significant(ever increasing) lag between source
and target despite several patches provided by oracle.

We want to be able to :
1) identify which insert/delete/update happened in one transaction just by looking at data in audit tables in target.
2) We want to be able to correctly sort these transactions.

This would help us in going back in time and find out how database looked like at any given time.
Minor lag between source and target ( say 5-10 minutes) is fine as long as order of transactions can be identified.

It seems that capturing systimestamp won’t work because I found following in documentation:
link: https://docs.oracle.com/en/middleware/goldengate/core/18.1/oracle-db/using-oracle-goldengate-oracle-database.pdf
“Integrated Replicat applies transactions asynchronously. Transactions that do not
have interdependencies can be safely executed and committed out of order to achieve
fast throughput. Transactions with dependencies are guaranteed to be applied in the
same order as on the source.”


This is also true for parallel replicat it seems.
I am aware of COMMIT_SERIALIZATION parameter but that may cause lag and also I don’t think that necessarily means timestamp would capture the right order.
I noticed in the same link that Oracle advises following expression for ordering operations. Will the following work ?
@COMPUTE(@COMPUTE(@NUMSTR(@GETENV ("RECORD", "FILESEQNO"))*100000000000)+@NUMSTR(@GETENV ("RECORD", "FILERBA")))
Please note that there are several transactions on the same primary key in one second.
My apologies for a long query !

and Connor said...

Thanks for your patience. I reached out to Nick from the GoldenGate team. His response below

Check the following MOS note to ensure the correct method and setup to order transactions.

"What Tokens need to included in the transaction to make it unique for Insertallrecords to be used in the replicat (Doc ID 1340823.1)"

but other than that, there is no way to do what they want in Integrated Replicat, as it will always use multiple threads to apply the transactions that can be done in parallel, it just ensures that the *commit* order is always correct. If they don’t want to use the method above, they would need to switch to classic replicat, which is REALLY slow compared to Integrated Replicat.





Is this answer out of date? If it is, please let us know via a Comment