2. Understanding the Replicator : Replicator Components : Change Recorder : How the Change Recorder Works
 
Share this page                  
How the Change Recorder Works
When a user makes a change in a table that has been registered for replication, the Change Recorder function is activated and the following process begins:
1. A replicated transaction key for that row is generated internally.
2. The Change Recorder inserts a new row into the shadow table with the replicated transaction key and the key columns of the base table.
If the change is an insert, the shadow record for this new replicated transaction key contains zeros for the previous replicated transaction key. If the change is an update or delete, the shadow record for this new replicated transaction key contains the replicated transaction key for the previous replication transaction for this row.
3. In full peer situations, if the change is an update or delete, the Change Recorder inserts the previous replicated transaction key and an image of the row associated with this ID into a new row in the archive table. An indicator is set to reflect that the data for the old replication is now in the archive table instead of the base table.
In this way the shadow and archive tables provide the sequential history of every replicated row.
4. The Change Recorder inserts the replicated transaction key into the input queue.
The input queue contains the information necessary to complete the replication, except the destinations.
The following figure illustrates the tasks of the Change Recorder: