Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sync framework with SQL Server 2008 Change Tracking

Is there a way to synchronize two SQL Server 2008 databases(any edition) using Microsoft Sync Framework and SQL Server 2008 Change Tracking mechanism, instead of provisioning the databases with the required schema changes(triggers, sps, aux tables) to track changes?

Is there any code sample?

like image 722
AlejandroR Avatar asked Sep 26 '26 17:09

AlejandroR


1 Answers

Yes, this is possible. Use the Sql Express sample sync provider (http://archive.msdn.microsoft.com/sync/Release/ProjectReleases.aspx?ReleaseId=1200). It is not supported by Microsoft and it uses Sync Framework 2.0 techniques instead of the newer 2.1 techniques for collaborative sync.

Enable change tracking on the server, create the anchor and guid table on the client. Create sync adapters per table in the sync agent and you're off. You have to keep in mind that the sql express client provider uses the server provider under the covers, so you need to reverse it's thinking in some places (download becomes upload).

like image 198
stombeur Avatar answered Sep 28 '26 21:09

stombeur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!