Synchronization Overview

Initial synchronization ensures that the table schema and the table data in the publication and destination databases are made identical. Replication ensures that updates are applied to a subscriber only after the subscriber is synchronized. Initial synchronization affects new subscribers only.

When a publication is first created a copy of the table schema is written to a file for transfer. If an index is requested, the index is created as part of this schema. When synchronization begins, a "snapshot" is taken of the table data of the published article, and that snapshot is also written to a file. If an index is requested, the index is created as part of the schema. The table schema is written to an .SCH file, and the table data is written to a .TMP file. These files are stored in the working directory of the distribution database (by default, \SQL60\REPLDATA). The .SCH and .TMP files are a synchronization set that represent a snapshot in time of that article. There is a synchronization set for each article within a publication.

After the synchronization set is created, subsequent inserts, updates, deletes, or modifications to the published data are captured but will be replicated to each subscriber only after its initial synchronization is complete. Thus, SQL Server ensures that updates are applied to a subscriber only after the subscriber has a current snapshot of the table schema and data.

When synchronization sets are distributed and applied to subscribers, only those subscribers waiting for initial synchronization are affected. Other subscribers to that publication or articležthose that are already synchronized and have been receiving inserts, updates, deletes, or modifications to the published datažare unaffected.

Initial synchronization can be accomplished automatically or manually (as described in the topics that follow). Synchronization of all new subscribers can be scheduled to occur either frequently (every few minutes) or on a specified day at a specified time.

All components of a publicationžall the articlesžare synchronized simultaneously, preserving referential integrity between the underlying tables.