Answered by:
SyncFX 2.0 sql server timeout exception

Question
-
Hi,
I am using SyncFX 2.0 in my application and there I am using SqlSyncProvider and SqlSyncProvider to sync SQL server and CE databases. Things are fine for most of the cases, but in a particular case I am getting timeout exception when sync is failing in enumerating changes on the SQL Server. I know that the sync scope has lot of records in this case, but this thing was working fine with old providers.
Can someone suggest how I can increase the timeout limit. I have tried with Connection Timeout in connection string, but that did not solve the issue.
thanks
SumitFriday, January 22, 2010 7:09 PM
Answers
-
One suggestion is to do a more frequent sync so that the source replica can have all its changes enumerated before the execution timeout.
Thanks.
Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.- Proposed as answer by L Zhou [MSFT]Editor Friday, January 22, 2010 8:15 PM
- Marked as answer by Liam Cavanagh - MSFTMicrosoft employee Thursday, January 28, 2010 5:21 PM
Friday, January 22, 2010 8:15 PMAnswerer
All replies
-
This is a known issue and the development team is going to fix it.
Thanks.
Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.Friday, January 22, 2010 7:57 PMAnswerer -
Thanks Leo.
When is it expected to be released? And, any suggested workaround?
- SumitFriday, January 22, 2010 8:11 PM -
One suggestion is to do a more frequent sync so that the source replica can have all its changes enumerated before the execution timeout.
Thanks.
Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.- Proposed as answer by L Zhou [MSFT]Editor Friday, January 22, 2010 8:15 PM
- Marked as answer by Liam Cavanagh - MSFTMicrosoft employee Thursday, January 28, 2010 5:21 PM
Friday, January 22, 2010 8:15 PMAnswerer -
I have discussed with the PM and DEV on this issue and there is work around to expose the command exection timeout, using DbSyncProvider instead of using SqlSyncProvider.
1. You can manually crafted all those Select Insert/Update/Delete command and Insert/Update/Delete command for the DbSyncProvider or,
2. Create a DbSyncProvider after the database/tables are provisioned by the SqlSyncProvider.
a. To Get ScopeInfo - SELECT config_data from scope_info info join scope_config config on info.scope_config_id = config.config_id where info.scope_name = @scopeName
b. Deserialize the returned data to become SqlSyncProviderScopeConfiguration object.
c. Add to each adapterConfig in scopeConfig.AdapterConfigurations to the DbSyncProvider.
d. Set Provider.SelectScopyInfoCommand to "select scope_id, scope_local_id, scope_sync_knowledge, scope_tombstone_cleanup_knowledge, scope_timestamp, scope_config_id, scope_restore_count from scope_info where scope_name = @sync_scope_name".
e. Set Provider.UpdateScopeInfoCommand to "UPDATE [scope_info] SET [scope_sync_knowledge] = @sync_scope_knowledge, [scope_tombstone_cleanup_knowledge] = @sync_scope_cleanup_knowledge WHERE [scope_name] = @sync_scope_name AND (@sync_check_concurrency = 0 OR [scope_timestamp] = @sync_scope_timestamp);SET @sync_row_count = @@ROWCOUNT"
f. Set NewTimestapmComand.
Thanks.
Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.Friday, January 22, 2010 10:21 PMAnswerer -
Hi Leo,
Is it also possible for the team to expose the SqlSyncScopeTableHelper class. Since that internal class has the default implementation for the SelectNewTimeStampCommand, SelectScopeInfoCommand and UpdateScopeInfoCommand.
It would help a great deal in building a SQL Server compatible provider using the DbSyncProvider as a base class.
Also if the AdapterConfig property on the SqlSyncTableProvisioning class could be made public, this again would allow anyone to create a custom DbSyncProvider class that is compatible with the SqlSyncProvider class.
ps: the SQL for the SelectNewTimestampCommand is:SELECT @sync_new_timestamp = min_active_rowversion() - 1
Monday, January 25, 2010 8:00 AM -
The latest news I got from the developement team is that - they are going to address the exec timeout issue of the provisioning commands in the Sync FX 2.1 which is currently targeting the 1st half of this year.
Thanks.
Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.Tuesday, January 26, 2010 2:05 AMAnswerer