Subscribe sets in SQL replication

After you register your sources, you create subscription sets, in which you pair your sources with targets. Each source-target pair is referred to as a member of the subscription set in which it is created. You can use subscription sets to schedule the replication of data in one or more source-target pairs from one source server to one target server.

The subscribe sets define the rules about how to keep the consistency between source and target objects, so that the SQL replication engine can follow these rules to do SQL replication. Generally, we need to give SQL replication the following details:

Interval timing
Continuous replication
Event timing

  • Whether to use data blocking

  • Whether to issue one COMMIT for all applied data or to issue interim commits

  • Whether to transform data in the subscription set with SQL scripts or stored procedures

So, when you create a subscription set, the following are some of the major attributes defined:

  • A name for the subscription set

  • The source and target server name

  • The apply qualifier

  • When to start replication, how often to replicate, and whether to use interval timing, event timing, or both

  • Data blocking, if you expect large volumes of changes

Note: If the subscription set is for replication from or to a non-DB2 server, such as Informix®, the source or target server name will be the name of the DB2 ESE or DB2 Connect EE database containing the server definition for the non-DB2 source/target server.

When you create a subscription set, you map sources to targets as part of creating subscription sets. A subscription set groups together one or more source-target pairs, also called subscription-set members. Figure 5-4 depicts a simple subscription-set member, where a source table named catalog is mapped to a target table named catalog. The data replicated to the target is first staged in the CD table for the source.

Figure 5-4 Subscription-set sample in SQL replication
xxxx