Answered by:
batching with ADO.NET sync services (I get OutOfMemory on sync)

Question
-
I am having a problem that could be very common. I use ADO.NET sync services to sync a SQL CE 3.5 database with a large SQL 2005 database.
Due to the large amount of data exchanged I get OutOfMemory exception. So I started looking for a way to use batching. I think if the server would send for example 1000 rows at one time there will be no problems. But I still didn't find a way to implement this. There are some articles on how to implement batching with CHANGE TRAKING, but I can't use SQL2008 yet.
Are there any working examples for ADO.NET sync services without change tracking?
Thanks
Friday, August 6, 2010 3:06 PM
Answers
-
- Marked as answer by Radu Chirila Wednesday, August 11, 2010 7:07 AM
Wednesday, August 11, 2010 2:40 AM
All replies
-
have you checked How to: Specify the Order and Batch Size of Changes in the documentation? the sample code there shows how to retrieve an anchor by batch.
alternately, you should check out using dataset surrogates vs datasets when marshalling the changes.
Saturday, August 7, 2010 9:24 PM -
I implemented the method described here: http://msdn.microsoft.com/en-us/library/bb902828.aspx but i still get an out of memory exception. Probably because the dataset is too large. Strange because the PDA has at least 50MB of memory left during the sync.
Do you have an example with dataset surrogates? Or other ideeas?
Thanks
Sunday, August 8, 2010 2:28 PM -
- Marked as answer by Radu Chirila Wednesday, August 11, 2010 7:07 AM
Wednesday, August 11, 2010 2:40 AM -
This looks like an excellent sample. I start implementing. Thanks.Wednesday, August 11, 2010 7:07 AM