locked
Cannot able to do sync db using track change where both side have sql server 2008. RRS feed

  • Question

  • Is it possible to do sync db using both side having sql server 2008 using track change.i got pice of code where it is working using local database cache.but in the client side it only have ce provider.

    Is it any way to use local database cache as sql client?I want to do synchronous db using sql server 2008 where both client and server have sql server 2008.I have Sync framework 2.0 install my computer.if possible provied some sample code since i am new to .net it will helpfull for me.

    thanks.

     

    Wednesday, December 29, 2010 5:05 AM

All replies

  • Do you need to use SQL Server change tracking feature?

    If that's not required, Sync Framework 2.1 or 2.0 SqlSyncProvider or DbSyncProvider can do the sync between SQL Server 2008, using the trigger to track the changes happening in the sync tables.

     

    Wednesday, December 29, 2010 6:42 PM
    Answerer
  • Hi jin,

    thanks for suggestion, but  i need SQL sever change tracking feature.if i am not use this then i have to create trigger for each table, so i am looking on these feature.

    Thursday, December 30, 2010 7:11 AM
  • Currently we only support change tracking with DbServerSyncProvider with SQL Server, and it can sync with SqlCeClientSyncProvider on SqL Compact. We currently don't have out of box support for 2 SQL Server syncing with each other with those provider types.

    However, if you can consider using triggers, you could use SqlSyncProvider to do the sync between SQL Server databases, which can automatically create the triggers for change tracking purpose by Sync Framework so you don't need to do anything on that part.

    Thursday, December 30, 2010 7:07 PM
    Answerer
  • thanks jin.can u give some link for SqlSyncProvider,i.e some sample code..
    Monday, January 3, 2011 11:25 AM
  • Hi Sam,

    Here is some information about the SqlSyncProvider and samples.

    The general topic for database sync on MSDN is at http://msdn.microsoft.com/en-us/library/ee617382(v=SQL.110).aspx
    from there you can take a look at some tutorials about the basic concepts. http://msdn.microsoft.com/en-us/library/ff928494(v=SQL.110).aspx And there is also a working sample you can download and try with Visual Studio at http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=3422. (more samples at http://code.msdn.microsoft.com/sync under "Database Synchronization Provider Samples" section.

    Tuesday, January 4, 2011 7:11 PM
    Answerer
  • Thanks Jin :-)
    Wednesday, January 5, 2011 1:16 PM