none
Execute SQL commands in a batch with the SqlSyncProvider RRS feed

  • Question

  • I want to copy a large DB over the web using the sync framework.
    Because it is big I am using a batch size of 1000 and I see how chunks of data are being sent from client to server as expected.  

    The problem starts when the data is being written to the DB. Instead of executing the Insert commands in a batch I see (using an SQL Profiler) that each row is being inserted independently.

    This of course takes a lot of time. The client thinks that the sync is over but rows are still being written to the DB. It can take hours until all the data is inserted.

    Is there a way to make the SqlSyncProvider execute sql commands in a batch?

    Thanks

    Manu

    Tuesday, November 23, 2010 8:21 PM

Answers

  • if you're running SQL 2008, v2.1 has an option  for bulk application of changes via TVPs. check SetUseBulkProceduresDefault in the docs.
    • Marked as answer by manukahn Wednesday, November 24, 2010 9:17 PM
    Tuesday, November 23, 2010 11:29 PM
    Moderator