Synchronization between 2 SQL 2008 with change tracking RRS feed

  • Question

  •  http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=1200

    this example seems to work for SQL 2008 to an other version but not using Integrated change tracking

    I want to work with Change tracking between 2 SQL 2008 databases.
    I've tried to edit the code example, but i'm stuck

    look at folowing code

    DbServerSyncProvider serverSyncProvider = new DbServerSyncProvider();  
    SqlExpressClientSyncProvider clientSyncProvider = new SqlExpressClientSyncProvider();  
    SyncAgent syncAgent = new SyncAgent();  
    syncAgent.RemoteProvider = serverSyncProvider;  
    syncAgent.LocalProvider = clientSyncProvider

    It uses the SqlExpressClientSyncProvider, wich i don't want to uses, they write Change Tracking manually in it.(use guid, anchor table...)
    So i tried to assign a DBServerSyncProvider & DBSyncProvider to the clientSyncProvider variable

    but the problem is syncAgent.LocalProvider requires a clientSyncProvider wich is an abstract class..

    anyone knows how you fix the code to work with Change Tracking on both sides?

    • Moved by Hengzhe Li Friday, April 22, 2011 5:36 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Sunday, February 15, 2009 6:49 PM


  • I was able to get it working.

    I have 2008 Server to SQL 2008 Express client, using native Change Tracking.

    I have added additional complexity, so pasting the code here will require significant clean-up effort (no time - sorry), but you should be able to achieve it by using the example you're referring to, and modifying it according to this article:
    How to: Use SQL Server Change Tracking
    I was also able to modify my SQL Express provider to work with SqlSyncAdapterBuilder.
    Wednesday, February 18, 2009 2:15 PM

All replies