Cómo evitar System.OutOfMemoryException en Sync

I couldn't find a similar post, but an article in the MSDN which i do not understand so will link the article and ask for help.

I am using Sync-Framework to sync between a Sql-Server-CE and a Sql-Server-R2 Instance. Unfortunately i run into a OutOfMemory-Exception pretty quickly (i am syncing like 8 tables and the exception happens on the first table already), so i was thinking about ways to download smaller package and found the following article on MSDN which discribes how to add a batchsize to the Sync.

Unfortunatly this aint a one-liner (im really questioning the usefulness of sync-framework when you have to programm everything by hand...) but the code is pretty straight forward (i guess... couldnt test it yet) except for a little bit of SQL which i unfortunately have no idea of.


This is the Article, and my question is: Does anybody know what

[ ... ]
SELECT MIN(UpdateTimestamp) AS TimestampCol FROM Sales.Customer
SELECT MIN(InsertTimestamp) AS TimestampCol FROM Sales.Customer
[ ... ]

means? There are no TimeStamps in my SQL-Tables neither in the Tombstones, none of the Sync-Framework added rows are in fact TimeStamps. I dont know what the Code Should do nor what it does. Can anybody help me?

Gracias de antemano!

preguntado el 01 de febrero de 12 a las 14:02

The article documents the use of that data just above the Select statement you pasted. Get a starting point on the initial synch. You are are running out of memory on the first table then this article may be just what you need. -

2 Respuestas

are you getting the out of memory message on first sync or even on subsequent syncs?

this is a known problem with serializing large datasets in sync framework

echa un vistazo http://jtabadero.wordpress.com/2010/03/08/sync-framework-wcf-based-synchronization-for-offline-scenario-%e2%80%93-using-custom-dataset-serialization/

Respondido 02 Feb 12, 10:02

The timestamps are in the Tracking tables that sync framework creates. For each table that is synchronized by the framework, the system will generate a tracking schema that shadows that synchronized table. Look for tables named Yourtablename_tracking. Inside those tables you will see fields like local_update_peer_timestamp - type timestamp or scope_update_peer_timestamp - type bigint.

Respondido 03 Feb 12, 19:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.