locked
Initial Sync on devices - Best Practice Please! RRS feed

  • Question

  • Hi all,

    There are a number of threads on the issue of handling the initial sync of a client device including from a client point of view - http://forums.microsoft.com/Sync/ShowPost.aspx?PostID=3729457&SiteID=75. I'm still confused as to how to handle the first sync of a client, could anyone please help and answer my questions below?

    • Is it possible to create the database (schema and data) on the fly on first sync? Or is it better to include an empty sdf in the installer package - this would mean needing to manually update the client db schema each time the server schema changed.
    • Is anything built into Sync Services to handle updating the client db schema when the server db schema has changed?
    What I'm really looking for is some guidance into best practice advice on testing for initial sync and handling subsequent syncs, please!
    • Moved by Max Wang_1983 Friday, April 22, 2011 5:50 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, September 2, 2008 3:18 PM

All replies

  •  

    are you using the sync service client-sever scenario or Peer to peer scenario ? is you client on Sql Server or on Sql Compact ?

     

    thanks

    Yunwen

    Friday, September 5, 2008 7:40 AM
    Moderator
  • Sorry Yunwen I should be more clear,

    I'm working on a server/client scenario for devices so using SQL Server Compact Edition 3.5 database.
    Saturday, September 6, 2008 8:17 AM
  • I actually should have figured out myself --- only the client-server scenarion is supported on devices in the current releases.

     

    in general, there is nothing specialy for devices in such case. the device and desktop has the same code base and same logic for schema creation and data synchornization. only differnt things are devices only support Ntier configuration.

     

    However, device, comparing with desktop, is slow and its memory is much less also. so if your initial data is big, you should consider to pre-generate the database and choose tableCreationOpion as UseExisting to improve initial sync performance.

     

    also, if your data change is big, you may consider to use batching in sync also.

     

    the sync service BOL has details for both table creation option and batching support.

     

    now explictly to your questions:

     

  • Is it possible to create the database (schema and data) on the fly on first sync? Or is it better to include an empty sdf in the installer package - this would mean needing to manually update the client db schema each time the server schema changed.

    >>> the first sync, by default, will create client db schema.

     

  • Is anything built into Sync Services to handle updating the client db schema when the server db schema has changed?

    >>> no , incremental schema change is not supported. please refer to BOL, handling schema change session for details on how to handle add/drop columns.

     

    hope this helps.

     

    thanks

    Yunwen

Saturday, September 6, 2008 10:21 PM
Moderator