2. Understanding the Replicator : Replicator Components : How Replication of Data Occurs
 
Share this page                  
How Replication of Data Occurs
Replication of data is carried out by the sequence of tasks performed by the Change Recorder, Distribution Threads, and Replicator Server.
Whenever a database table registered for replication is manipulated, the replication of that table is executed as shown in the following diagram, starting with #1:
The steps in the previous diagram are as follows:
1. A user updates the local database through the local DBMS Server.
2. The Change Recorder updates the shadow table.
3. The Change Recorder updates the archive table.
4. The Change Recorder adds a row to the input queue.
5. After a commit, the distribution threads read the input queue and the propagation paths table to determine whether and to where the replication needs distributing.
6. The distribution threads update the distribution queue with the replication and its destination information.
7. The distribution threads delete the replication from the input queue.
8. The distribution threads alert an active Replicator Server.
9. Replicator Server reads the distribution queue.
10. Replicator Server updates the remote database using remote SQL or database procedures.
11. If the remote database is a full peer or protected read-only target, the Replicator Server updates the corresponding shadow table.
12. If the remote database is a full peer target, the Replicator Server updates the corresponding archive table.
13. If the remote database is a full per target, a row is added to the remote input queue.
14. The appropriate row is deleted from the local database’s distribution queue.
The Replicator Server deletes the corresponding rows from the local distribution queue.
15. The changes at the remote and local databases are secured using two-phase commit.