Was this helpful?
Methods to Handle Collisions
There are two ways to handle collisions—automatic or manual. Each method has advantages and disadvantages. Automatic resolution (using the Ingres Replicator collision mode settings) takes less time but can produce unexpected results. Manual resolution gives you more control and, in some cases, is the only way to resolve a conflict.
To resolve the condition, you must restore consistency to the base tables of the source and target database as well as to the replicated transaction keys in the shadow tables. Replication operations (insert, update, delete) that caused the collision must also be removed from the distribution queue.
How You Resolve Collisions Manually
You can resolve collisions manually in the following ways:
Visual DBA: You can resolve collisions manually by expanding the Replication branch and expanding the branch of the desired database and clicking the Collisions tab. For more information, see the online help topic Resolving Collisions Manually.
Command Line: To resolve a collision manually, follow these steps:
1. Determine the correct image of the record in collision that must be in the replicated system.
2. Determine the replicated transaction key for the record.
The key that you select must be the replicated transaction key of one of the records in collision.
3. To correct the record, you need to temporarily disable the Change Recorder. To do this, issue a set trace point DM32.
Note:  This disables the Change Recorder for your session only.
4. Update the record to be the correct image.
5. Update the shadow record, giving it the selected replicated transaction key.
6. Remove any replication commands from the distribution queue that cause this record to be in collision.
7. Re-enable the Change Recorder by issuing a set notrace point DM32.
8. Repeat Steps 1-6 for each database in the replicated system that is affected by the collision.
Automatic Resolution of Collisions
With automatic resolution, when two records collide, one record prevails over the other. If the operation was an insert or an update, a record survives a collision by overwriting the record in the target database (the target row is deleted and the prevailing source row is inserted in its place). If the transaction was a delete, the record in the target database is deleted. If a record does not survive a collision, its replication operation (insert, update, or delete) for that target is removed from the distribution queue.
Note:  Automatic resolution overwrites the entire record and can overwrite columns that have correct information with columns that do not have correct information. You must not use automatic resolution if the information contained in the losing record is important. For example, if your database contains documents that are continually updated with new information, you can lose information with automatic resolution.
Last modified date: 11/28/2023