Answered by:
Overcoming SelectChanges Command TimeOut With Large Dataset

Question
-
If you have a small memory box (say Windows XP, 512mb-1gb memory) with SQL Server 2005 Express and you have a table to sync with millions of rows in it, then the ObjectPrefix_TableName_SelectChanges command can timeout.
The default SqlCommand timeout is 30 seconds. It's not too hard to get this to timeout with the selectchanges SP which includes the join of the tracking table with the base table.
It is possible to subclass DbSyncProvider (subclass of RelationalSyncProvider which is a subclass of KnowledgeSyncProvider) and then to construct all of the database manipulation commands oneself. Thus, when setting the command, the timeout can be specified.
But this is a bunch of work (and testing) for something that really should be built in as a configurable item.
Does anybody have a way of controlling the command timeout (not to be confused with the connection timeout in the DB connectionstring) without subclassing one of the providers?
Or have I already answered my own question?
Tuesday, June 5, 2012 8:09 PM
Answers
-
The command timeout is configurable in the 2.1 release
- Marked as answer by Speedware Sunday, June 17, 2012 2:54 PM
Tuesday, June 5, 2012 11:05 PM -
June,
Interesting, I hadn't seen that but...
Although that's true of SqlSyncProvider, it does not appear to be the case for SqlCeSyncProvider, SqlCeClientSyncProvider, DbSyncProvider or their superclasses RelationalSyncProvider and KnowledgeSyncProvider.
Steve
p.s. For those interested in the subclassing of DbSyncProvider, RelationalSyncProvider or KnowledgeSyncProvider, the following posts can help..
http://social.microsoft.com/Forums/en/syncdevdiscussions/thread/f6d524b3-df43-4337-8471-25300c6fc7eb
http://social.microsoft.com/Forums/en/syncdevdiscussions/thread/4af321b6-4678-4620-af46-98c560cc2bc6
Since these create their own command, the command.commandTimeout property is readily available.
- Marked as answer by Speedware Sunday, June 17, 2012 2:55 PM
Wednesday, June 6, 2012 4:20 AM
All replies
-
The command timeout is configurable in the 2.1 release
- Marked as answer by Speedware Sunday, June 17, 2012 2:54 PM
Tuesday, June 5, 2012 11:05 PM -
June,
Interesting, I hadn't seen that but...
Although that's true of SqlSyncProvider, it does not appear to be the case for SqlCeSyncProvider, SqlCeClientSyncProvider, DbSyncProvider or their superclasses RelationalSyncProvider and KnowledgeSyncProvider.
Steve
p.s. For those interested in the subclassing of DbSyncProvider, RelationalSyncProvider or KnowledgeSyncProvider, the following posts can help..
http://social.microsoft.com/Forums/en/syncdevdiscussions/thread/f6d524b3-df43-4337-8471-25300c6fc7eb
http://social.microsoft.com/Forums/en/syncdevdiscussions/thread/4af321b6-4678-4620-af46-98c560cc2bc6
Since these create their own command, the command.commandTimeout property is readily available.
- Marked as answer by Speedware Sunday, June 17, 2012 2:55 PM
Wednesday, June 6, 2012 4:20 AM