Dela via


Considerations for Snapshot Replication

An initial snapshot is typically applied for all types of replication, so you should be familiar with the planning considerations for snapshot replication even if you choose to implement transactional replication or merge replication. Snapshot replication requires planning in the following areas:

  • Creating and securing the snapshot folder

  • Transferring and storing snapshot files

  • Scheduling snapshots

Creating and Securing the Snapshot Folder

The snapshot folder is simply a directory that you have designated as a share; agents that read from and write to this folder must have sufficient permissions to access it. For more information about securing the folder appropriately, see Securing the Snapshot Folder. Prior to implementing replication, test that the replication agents will be able to connect to the snapshot folder. Log on under the account that will be used by each agent and then attempt to access the snapshot folder.

Transferring and Storing Snapshot Files

When planning to transfer and store snapshot files, estimate the disk space required at the snapshot file location and at the Subscriber that will receive the snapshot files. The amount of space required for one snapshot can be affected by several factors including the size and number of articles published and whether or not the files are compressed.

You have the option of storing snapshot files in a location other than or in addition to the default location (which is typically at the Distributor). Alternate locations can be on another server, on a network drive, or on removable media (such as CD-ROM or removable disks). Additionally, you can compress the snapshot files to improve network performance by writing data in the Microsoft CAB file format. For more information, see Snapshot Options.

When snapshot files are created in both the default folder and in an alternate location on the same drive, each file is created initially in the default folder and then copied to the alternate location. If you are using compressed snapshot files, the files are copied and compressed before they are placed in the alternate snapshot location. The total space required for all snapshot files in this situation is the size of the original snapshot files in the default location plus the size of the compressed snapshot files in the alternate location.

Scheduling Snapshots

Generating a large snapshot can be resource-intensive, so you should schedule the Snapshot Agent to run at times of less activity on the server.

To plan the optimum schedule for running the Snapshot Agent, estimate the length of time it takes the Snapshot Agent to complete the snapshot. Because the snapshot is created using the bcp utility, perform a test bulk copy of your data set and time how long it takes to complete. If your data set is very large, perform the bulk copy on a sample of the data set and extrapolate the elapsed time to the entire data set. For more information about bcp, see bcp Utility.