none
Determine on the Server DB which records have been sync'd RRS feed

  • General discussion

  • We have the sync framework working properly. Our users enter new records into a SQL 2008 DB via a windows client. Based on a filter those records are sync'd down to mobile devices for processing in the field. My question is how can I determine by looking at the Server DB which records have been sync'd versus those that haven't. I have a need to display a list of all entries that are waiting to be distributed to the field. I can add a column to the table that would hold the sync time but not sure how to update this during the sync process.

    Thanks, Donta
    Tuesday, February 9, 2010 8:35 PM

All replies

  • Hi Donta,

    Which particular sync scenario are you using? offline or collaboration type?.
    Wednesday, February 10, 2010 1:58 AM
    Moderator
  • These are the offline scenarios because you are using devices.
    Pretty much using the commands you have already implemented in you you SelectIncrementalInserts/Updates/Deletes command, you can figure this out with the addition of the last sync anchor value.
    Look at section "Determining Which Data Changes to Download to a Client" in these 2 articles: How to: Use SQL Server Change Tracking and How to: Use a Custom Change Tracking System<!---->

    <!---->
    This posting is provided AS IS with no warranties, and confers no rights
    Thursday, February 11, 2010 7:51 AM
  • hi mahesh,

    isnt the last sync anchor on the client side? so to figure out all changes in the server side which has yet to be sync'ed, you need to go thru each client to figure out what they've got so far?
    Thursday, February 11, 2010 8:15 AM
    Moderator
  • Yes you are right, you would need to know that. But maybe one can persist these on the server during the sync time during the enumeration on the server.
    This posting is provided AS IS with no warranties, and confers no rights
    Thursday, February 11, 2010 8:40 AM
  • got it. thanks.

    adding the anchor table istself as the last table for synching might be a good idea :)

    Thursday, February 11, 2010 8:48 AM
    Moderator
  • :)
    But remember if you do that, the data maybe one sync old though...
    This posting is provided AS IS with no warranties, and confers no rights
    Thursday, February 11, 2010 8:57 PM