Skip to content

Designing groups

How to divide tables into incremental groups, and why it matters. For snapshot groups, see Snapshot groups, Latency and throughput and Reliability.

An incremental group is the unit you poll, pause, resume, reset, replay and re-baseline. It applies all its members' changes in one cycle, on one thread, with one set of apply settings. Design groups around that.

Group tables that must be handled the same way

Do: put tables in the same group only when they share the same destination, apply method (DML Replication), latency requirement (Poll Interval, Use Fixed Schedule) and maintenance window. Start a new group whenever one of those differs, for example one for the tables a reporting system needs within minutes and another for tables applied once a day.

Why: every setting on the group's Advanced tab applies to all its members, which share one source and one destination. Pause, Resume, Reset and Replay act on the whole group; Reset makes every member need a new baseline.

Not when: tables that must stay consistent with each other at the destination (for example an order and its lines) belong in the same group, so that they're applied in the same cycle and committed together.

Isolate large, volatile or fragile tables

Do: give a table its own group when it:

  • receives far more changes than the others (a busy transaction or log table);
  • is very large, so that its baseline takes hours;
  • has LOB columns (see LOB and long columns);
  • goes to a destination table with triggers, constraints or other objects you manage, which may reject changes.

Why:

  • One cycle, one thread. A burst of changes to one table delays every other table in the group; in a group of its own, the busy table is applied in parallel with the other groups.
  • One failure stops the group. When a change can't be applied (for example a destination trigger fails, or a duplicate key with the default incrementalDebug of 0), the whole cycle is rolled back and retried about every minute. Until the cause is fixed, no member of the group receives changes (see Polling errors).
  • LOB tables are slower to apply. LOB values aren't staged (except for SQL Server sources): the Replicator Service reads them from the source table and applies that table's changes one row at a time.
  • Large baselines. An isolated large table can be baselined when and how you choose, without holding up the other tables. See Baselining a large table with partitioned snapshots.

To split an existing group, create the new group, pause both and use Move Subscription: the members keep their statistics and don't need a new baseline (see Move).

Don't make groups too big or too many

Do: keep groups to a size you're happy to pause, reset or re-baseline as a unit, and delete groups and subscriptions you no longer use.

Why: every active group has its own poll thread, and each poll queries the staging database and uses destination connections, so many small groups add load on the Replicator Service's computer and both databases. At the other extreme, a group with very many tables can fail in the staging database when one request covers too many tables; see AGENT_STACK_SZ error from the staging database, which works around it by lowering the group's transaction limit. Unused groups left paused still hold staged data at the Capture Agent (see staging).

One table appears once per group

A group can hold only one subscription per source table: the Subscription Wizard doesn't offer tables already in the group, and copying, moving or importing a member into a group that already has its table fails.

Do: to replicate the same source table twice, for example to a second destination, put the second subscription in another group (with Copy Subscription, see Copy or convert).

Why this matters: each group registers its own subscription with the Capture Agent, which prunes a table's staged changes only up to the position every subscription to it has confirmed. A table in two groups is staged once, but kept until the slower (or paused) group has applied it.

Never let two groups write to the same destination table

Do: make sure each destination table is maintained by one incremental subscription only. Check the destination Object Schema and Object Name when you copy or import members, or create a second group for the same source and destination.

Why: a baseline empties the destination table (Truncate or Delete) and reloads it from its own source table. A second subscription writing to the same table loses its rows at every baseline of the first, and each subscription's changes are applied to rows the other one owns.

Not when: several subscriptions deliberately fill one table, each with its own partition key and Delete existing data before replication, so that a baseline deletes only its own rows.

Name groups after what they do

Do: use names that say a group's source, destination and purpose, such as ERP_TO_DW_ORDERS_NRT or ERP_TO_DW_DAILY, and describe it in Comment. Use the same names on test and production servers.

Why: the name appears in every message, email notification, log entry and the Scheduled Tasks tab, so a meaningful name tells you at once what's affected. Identical names let you move configurations with Export and Import Subscriptions (see Export and import) and with PowerShell scripts, which address groups by name.