Progress
Programming
Handbook
Create a Collision Log
The collision log is an important concept in data collision resolution. It is crucial that you isolate the physical records involved in collisions from the original records, and from the replication change log. Users are able to change records in the database again before the collisions are resolved, thereby changing data needed for the resolution. Isolating the data in the physical records at the point they collided maintains the integrity of your collision resolution process.
To create the collision log, write a procedure that (1) compares the replication change logs between respective sites to determine changes to identical records, and (2) places these records in a separate table. This log must contain a sequence number identifying all records involved in a collision.
NOTE: This sequence number is important. There might be records contained in the transaction that have not collided, but still need to be included in the log. This is because replication occurs by transaction. All of the records must be replicated together, or not at all.Table 11–3 shows a sample format for the collision log.
Table 11–3: Collision Log Table Schema Field Datatype Description CollisionID integer A sequence number that identifies all records involved in a collision. This transaction relates the local and remote records that collided. TransactionID integer Identical to the transaction id (see Table 11–2). KeyValue char Identical to the value shown in Table 11–2. TableName char Identical to the value shown in Table 11–2. Event char Identical to the value shown in Table 11–2. DataRecord RAW RAW data field shown in Table 11–2. CollisionDate date Transaction date shown in Table 11–2. CollisionTime char Transaction time shown in Table 11–2. Collided logical Logical value that flags whether the record actually collided with another record. This value is created when the records are created in this table.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |