locked
Does the sync process wait until a table lock is released to perform a sync? RRS feed

  • Question

  • We are having an issue with the sync framework where tables appear to lock and prevent users from syncing and our team wanted to check with the Sync Dev. Team on this issue.

    Background:  We have a centralized SQL Server 2008 R2 database that has some of it's tables enabled with change tracking and synced to desktop clients using a DOWNLOAD ONLY sync that only syncs the changes from the serverside tables to the clients when a user opens/launches the desktop clients.  The desktop clients are WPF applications with a local SQL CE 3.5 DB.  We are running a process every two hours on the server side DB and it changes the values of thousands records in the tables that are synced with the clients and it is seeming that if the user attempts to open the application while or soon after this process occurs the application sync gets stuck for quite a while, e.g. 30+ minutes for a sync process that usually takes less than 1 minute.

    Question(s):

    1. Does the sync process wait until a table lock is released then perform a sync or what occurs if a table is locked when a sync is requested from a client requesting to download only the changes?

    Thanks.


    Friday, March 18, 2011 4:29 PM

All replies

  • If you're using SqlSyncProvider, there is a property SqlSyncProvider..::..CommandTimeout where you can set the timeout. the default is the ado.net default of 30seconds.

    you might want to verify via SSMS' Activity Monitor or sp_who if the Sync Fx session is indeed being blocked by the server side process.

    Friday, March 18, 2011 11:19 PM