Skip to content

Manage snapshot groups

How a snapshot group run works, what you do with a group once it exists, and how a failed run resumes. To create a group, see Snapshot groups.

How a group run works

  1. Foreign keys of all members are dropped (when the group replicates foreign keys).
  2. Members are copied in run order, up to Maximum Subscriptions at a time: for each, primary keys and indexes are dropped, the data is copied, and they're created again. Members start in run order but can finish in any order.
  3. Foreign keys are created again.

A member already running (for example, on its own schedule) is skipped with the warning "Member subscription ... is busy and cannot be run." Avoid overlapping schedules.

Error Recovery decides whether the run goes on after a member fails:

Error Recovery What happens
Ignore Errors and Warnings (default) Every member runs; failures are recorded.
Halt on Errors only The first error stops the group, including members that are running. Members not yet started are recorded as canceled by the group.
Halt on Errors and Warnings Same, and a warning (such as truncated data, or a skipped busy member) also stops the group.

Maximum Retries (groups with Allow Checkpoint/Restart): a member whose copy fails is copied again in the same run, after the other members, up to this many times, resuming from the failed copy's checkpoint when it can. Only a failure that has used up its retries counts as the member's result, so a retried failure doesn't stop a Halt on Errors group. The default, 0, doesn't retry.

Actions

To change the group's settings or members, open its Properties tab (see Group properties).

Button What it does
Stop Stops the running group; members still running are canceled.
Start Tracing / Stop Tracing Records each run in detail for diagnosis; a failed run keeps its recording in the run history.
Export Saves the group's subscriptions to a JSON file, which you can import into another snapshot or incremental group with Import Subscriptions (see Export and import).
Duplicate Creates a group with the same settings and schedule and no members. If the original is scheduled, so is the copy.
Delete Deletes the group. Choose whether to keep its member subscriptions (default) or delete them too; members that also belong to another group are kept.

Checkpoint/Restart

Allow Checkpoint/Restart lets a group run that fails or is stopped pick up where it left off instead of copying every table again, which matters most for large tables, where starting over can take hours. It's on for groups created in the Data Replicator Manager. It also applies to incremental groups' baselines run with Run, and to an incremental member baselined on its own (for example Run on the subscription, or the baseline after a save), which uses its group's setting.

What is recorded

While a member is copied, the Replicator Service keeps its checkpoint in the control database:

  1. Before the copy: the before-processing SQL runs, and the service records how many rows the destination table already holds.
  2. At every commit: it records the key values of the last committed row. Commits happen every ODBC commit interval rows (BCP commit interval with a native loader); see Group Replication Settings.
  3. When the member finishes successfully: it's marked complete.

The copy reads the source table in key order, so the last committed row's key marks exactly how far it got. The key is the table's primary key (its replicated, non-nullable columns); on Db2 for i, always the relative record number.

What the next run does

  • Completed members are skipped. Only members that didn't complete run again.
  • An interrupted member resumes from its last commit when both are true:
    • the table has a primary key (see above);
    • the destination holds exactly the rows it had before the copy plus those committed since: nothing was added or removed there in the meantime.

The service then reads only the source rows after the last committed key and appends them, without emptying the destination table or repeating the before-processing SQL. - Otherwise the member starts over, with a warning in the replication events. - A member that appends can't start over. With Append replicated rows to existing data, starting over would add the rows already committed a second time. Instead, the run fails and says how many rows the destination may hold from the interrupted copy. It keeps failing until you remove those rows and clear the checkpoint (saving the subscription clears it; see below). - When every member has completed, or none has started, the next run is a full run again and the checkpoints are reset.

The run's messages include "Checkpoint/Restart being allowed for this snapshot group" when the option is on.

What clears the checkpoints

  • Saving a member subscription clears its checkpoint, so its next run starts over.
  • Changing Allow Checkpoint/Restart on the group clears all its members' checkpoints.

Limits

  • Group runs only. A snapshot subscription run on its own (Run on the subscription) never restarts from a checkpoint; it copies the whole table. An incremental member run on its own uses its group's Allow Checkpoint/Restart.
  • Views aren't resumed by row identifier. On Db2 for i and Db2 for LUW sources, a view's relative record number or RID doesn't identify its rows (a join repeats them, a DISTINCT view gives 0), so a view is never ordered by it as a table is, and the run's messages say so. An interrupted copy of such a view starts over, unless its subscription has a primary key or unique index: then it resumes by that key, like a table. Views on other sources are handled like tables.
  • No commits, no checkpoints. With a commit interval of 0, rows are committed only at the end of the table, so an interrupted member always starts over. Keep a non-zero commit interval for large tables.
  • Databricks destinations always start over.
  • Tables without a primary key start over (on Db2 for i, the relative record number is used instead).

For advice on when to rely on it, see Best practices: use checkpoint/restart for long baselines.