יום שלישי 05 יוני 2012 20:09
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?
יום שלישי 05 יוני 2012 23:05מנחה דיוןThe command timeout is configurable in the 2.1 release
- סומן כתשובה על-ידי Speedware יום ראשון 17 יוני 2012 14:54
יום רביעי 06 יוני 2012 04:20
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.
p.s. For those interested in the subclassing of DbSyncProvider, RelationalSyncProvider or KnowledgeSyncProvider, the following posts can help..
- סומן כתשובה על-ידי Speedware יום ראשון 17 יוני 2012 14:55