Move Snapshot Folder on Existing Web Sync Publication

תשובה Move Snapshot Folder on Existing Web Sync Publication

  • Thursday, April 26, 2012 12:23 PM
     
     

    Hello,

    We are running merge replication on SQL Server 2008 R2 with web synchronization and pull subscriptions (all subscribers are 2008 R2).  The publication uses dynamic filters (with join filters) based on HOST_NAME() and we are using web sync for the snapshots rather than FTP.

    We are running low on disk space on our primary drive due to size of the default snapshot folder so we're looking to move the folder to another drive before adding some new articles. Assuming the new folder is setup with exactly the same permissions as the existing one:

    1. Can we simply use sp_changedistpublisher to change the working directory for the publication then re-run the snapshot agents for the schema and each data partition?  

    2. Are there any additional steps or anything I've missed in IIS?

    3. Will we need to reinitialize or change anything at the subscribers or will they continue to sync as is?  They are all setup to use the default snapshot location (Snapshot Location = 'Default Location' and Snapshot Folder = 'Download from Web Server' in subscriber properties).

    4. Can we delete the old folder as soon as all the new snapshots are created?

    5. After the change, are there any additional considerations when adding future articles/subscribers?

    Thanks in advance.

    Tim

All Replies

  • Thursday, April 26, 2012 7:55 PM
    Moderator
     
     Answered

    1) no, this will not work as this controls future snapshot creation. It will not move the existing snapshot files.

    2) For the dynamic snapshot folder locations you can specify this in the job itself.

    3) I would not change the snapshot location as this will force a reinitialization, but you can change the dynamic job locations on the fly.

    4) Yes, I normally zip them up and apply them on the subscriber using the -dynamicsnapshotlocation parameter of replmerge.

    5) If you only worry about new dynamic jobs you will not need to move the original snapshot folder location.


    looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

    • Proposed As Answer by amber zhangModerator Friday, April 27, 2012 1:30 AM
    • Marked As Answer by TSD123 Monday, May 14, 2012 2:25 PM
    •  
  • Wednesday, May 02, 2012 3:06 PM
     
     

    Hi Hilary,

    Thank you for your reply.  Just to make sure I've understood you correctly, if (on the publisher/distributor) I modify the -DynamicSnapshotLocation parameter for each data partition in 'Job Step Properties - Run Agent' as below, the dynamic snapshot will be created in the new location when the job is next run. Will I need to change the snapshot location properties on each subscriber or does IIS get the dynamic snapshot location from the distributor when using web-sync?

    -Publisher [XXXXXXXXX] -PublisherDB [XXXXDb] -Distributor [XXXXXXX] -Publication [XXXXDb_Pub] -ReplicationType 2 -DistributorSecurityMode 1  -DynamicFilterHostName [12] -DynamicSnapshotLocation [D:\SQL\ReplData\unc\XXXXXXX_XXXXDB_XXXXDB_PUB\12_5\] -PartitionId 5

    Thanks,

    Tim


    • Edited by TSD123 Wednesday, May 02, 2012 3:32 PM
    •