2

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?

skaffman
  • 398,947
  • 96
  • 818
  • 769
AlejandroR
  • 5,133
  • 4
  • 35
  • 45
  • It seems that unfortunately current sync providers do not support SQL Server 2008 change tracking. I have not been able to verify this officially either. – AlejandroR Mar 02 '11 at 22:58
  • See this question http://stackoverflow.com/q/1656652/23697 I'm currently implementing a similar solution and this is the only way to do it. Still struggling with using a server provider on the client side (everything is the wrong way around) but it should work. – stombeur Mar 03 '11 at 19:30

1 Answers1

3

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).

stombeur
  • 2,704
  • 22
  • 45