none
Is it possible to sync specific data with Microsoft Sync Framework RRS feed

  • Question

  • Hello,

              I want to sync data between three SQL Server databases residing at different locations. This syncronisation needs to be criteria based. e.g. The three Sql Server databases are c1, c2, S, where c1 & c2 are the customers and the S is the shared server. The database at the server contains all the data from c1 & c2. when any update happens at the server to a particular record (which is self idenfying it's customer (c1 or c2)) that update needs to be sync only with it's customer c1 or c2.

    My question is : Is it possible to sync the data from a single table to two different sql servers based on a apecific condition?

     

    -Ajinath

    Monday, May 17, 2010 10:04 AM

Answers

All replies

  • using the collaboration/peer-to-peer providers, you can define multiple sync scopes, each with different filter criterias. then make sure that the client is configured to the appropriate sync scope.

    Monday, May 17, 2010 10:11 AM
    Moderator
  • I have a similar problem as the original poster, however in a larger scale. Say I have a calendar application running on thousands of mobile devices (SQL CE).The devices spend most of their lives disconnected. Users occasionally turn in their devices and I need to sync their data to the main db so that when they check out another device they can then download it.

    My problem is that I want to store all the data on a single db, but then only provide user specific data to each device. Is there a clean way to set this up?

    Monday, May 17, 2010 3:35 PM
  • Hi,

    With Collaboration providers, you can define different static filters in different sync scopes to achieve it just as JuneT said. Please look at the detailed description and sample code in http://msdn.microsoft.com/en-us/library/dd918848(v=SQL.105).aspx.

    Thanks,
    Dong

     


    This posting is provided AS IS with no warranties, and confers no rights.
    Monday, May 17, 2010 7:31 PM
    Moderator
  • Thank you Dong,

     

    I have another question to follow the last one up. Will I notice performance issues running ~15,000+ scopes on a single table?

    Additionally can new scopes be defined (or destroyed) at run time? If each user needs their own scope and there is a high user turn over rate it would be imperative for this to be possible.

    Monday, May 17, 2010 8:10 PM
  • Hi,

    We didn't test with that many of sync scopes but my guess it should be ok. All sync scopes are stored in one scope_info table, and a SQL table with 15,000 rows are not very big. Please let me know if you find any performance issues when trying this scenario.

    You can add new sync scopes to the same tables when other sync scope is syncing with other endpoints. When a scope is not needed, you can remove it too. With Sync Framework 2.0 RTM, you have to manually remove a sync scope. The next version of sync framework will have APIs to deprovision sync scopes.

    Thanks,
    Dong


    This posting is provided AS IS with no warranties, and confers no rights.
    Monday, May 17, 2010 8:34 PM
    Moderator