locked
Overcoming SelectChanges Command TimeOut With Large Dataset RRS feed

  • 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

All replies