Partilhar via


Initializing a Merge Subscription Without a Snapshot

By default, a subscription to a merge publication is initialized with a snapshot, which is generated by the Snapshot Agent and applied by the Merge Agent. In some scenarios, you can initialize a subscription using another method, such as a backup. Merge replication supports initializing subscriptions without a snapshot for both filtered and unfiltered publications. The option is more commonly used with unfiltered publications and those that use static filters. Publications that use parameterized filters are typically initialized with a snapshot for a Subscriber's partition. For more information, see Snapshots for Merge Publications with Parameterized Filters.

When possible, we recommend initializing subscriptions with a snapshot. We recommend against initializing a subscription without a snapshot under the following conditions:

  • When using column-level tracking, vertical filtering, or making schema changes at the Publisher. This can result in non-convergence when initializing a subscription without a snapshot.
  • When using Web synchronization. Unused schema files are replicated to the Subscriber but are not used.
  • When you must reinitialize the subscription.
  • When you need the performance benefits provide by using precomputed partitions.

To initialize a merge subscription from a backup or using another method, use the following steps:

  1. Add a uniqueidentifier column with the rowguid and not null column attributes to the tables that will be used in merge replication.
  2. Perform a backup of the database you intend to initialize the subscriber with.
  3. Create a publication and generate the snapshot for the publication. Although the schema and data from published tables in the snapshot will not be used, the snapshot is still required because it includes system objects and metadata required by replication. These objects and metadata are copied to the Subscriber during the initial synchronization.
  4. Restore the backup at the Subscriber or copy data using another method. If you restore a backup, do not specify the KEEP_REPLICATION option. This option is designed to maintain replication settings during restore; the backup came from the Publisher, so you want to remove the Publisher settings from the database. The restored database will have the necessary Subscriber settings after the initial synchronization.
  5. Create a subscription, specifying that the subscription will be initialized manually.

Note

If a subscription is initialized without using a snapshot, the account under which the SQL Server service runs at the Publisher must have write permissions on the snapshot folder at the Distributor. For more information about permissions, see Replication Agent Security Model.

For more information, see:

See Also

Concepts

Initializing a Subscription
Reinitializing a Subscription

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

17 July 2006

Changed content:
  • Added information about situations where initializing a merge subscription without a snapshot may not work as expected.
  • Added a recommendation to not use this functionality.