Replication system processing

This section describes a typical replication system, according to the basic primary copy model, in which a primary Replication Server and a data server are separated across a WAN from replicate Replication Servers. It does not cover the case where primary data is updated at the replicate database.

Figure 1-3: Replication system overview

Figure 1-3 illustrates how data is replicated from a primary database to replicate databases. The L T L reads the primary database log and converts transactions for tables or stored procedures that are marked for replication into commands that are sent to Replication Server. The primary Replication Server stores the transactions in a stable queue. It also determines which Replication Servers manage replicate database with subscriptions for the data. In this figure, the primary Replication Server sends the transaction through wan to the replicate Replication Server. The replicate Replication Server either routes the transaction to another Replication Server or applies the transaction to replicate databases that it manages or both.

Figure 1-3 illustrates how data is replicated from a primary database to replicate databases. The following actions take place:

  1. RepAgent reads the primary database log and converts transactions for tables or stored procedures that are marked for replication into commands that are sent to Replication Server.

    The Replication Server stores the transactions in a stable queue (see “Distributed concurrency control”).

  2. The primary Replication Server:

    1. Determines which Replication Servers manage replicate databases with subscriptions for the data

      The primary Replication Server may have a direct route to a subscribing Replication Server or an indirect route, with one or more intermediate Replication Servers in between.

    2. Forwards the transaction to the appropriate replicate Replication Server, where it is stored in a stable queue

    3. Applies the transaction to any local replicate database for which there is a subscription for the data

  3. The replicate Replication Server performs one or both of the following actions: