Duties of the Snapshot and Distribution Agents

As I've mentioned, the work of snapshot replication is divided between the Snapshot Agent and the Distribution Agent. In this next section, we'll cover the work each of these carries out separately.

Snapshot Agent Tasks

The Snapshot Agent begins by connecting from the distributor to the publisher and setting a share lock on each of the tables included in a publication's articles. These locks help guarantee a consistent view of the data by preventing changes to the data until they are released. Naturally, this means that you'd normally want to run the Snapshot Agent during times when not being able to change the data in published articles isn't a problem for your users.

As it works, the Snapshot Agent ...

Get Guru's Guide to SQL Server Architecture and Internals, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.