Thursday, 4 May 2023

HANDLECOLLISIONS in GoldenGate

When data is replicated from a source database to a target database, conflicts can occur if the same data is modified in both databases simultaneously. For example, if a row is updated in the source database and the same row is also updated in the target database, a conflict arises."HANDLECOLLISIONS" parameter allows you to specify how these conflicts should be handled.

The "HANDLECOLLISIONS" parameter can take various values to determine the resolution strategy for conflicts. Some common values include:

ABORT: This value causes Oracle GoldenGate to abort the Replicat process when a conflict is encountered. This might be appropriate if you want to manually address conflicts before continuing replication.

SKIP: This value instructs Oracle GoldenGate to skip the conflicting transaction and continue replication with subsequent transactions.

OVERWRITE: This value allows the target transaction to overwrite the source transaction when a conflict occurs.

WARNING: This value generates a warning message and continues replication with one of the transactions.

DISCARD: This value discards the conflicting transaction without applying it to the target.

FAILONCOLLISION: This value causes Replicat to fail when a collision is encountered.

The appropriate value to use depends on your business logic and the importance of maintaining data integrity. You can set the "HANDLECOLLISIONS" parameter in your Oracle GoldenGate configuration file for the Replicat process. Here's an example:

HANDLECOLLISIONS OVERWRITE;

 

No comments:

Post a Comment