Changed seed on tables after sync RRS feed

  • Question

  • Hi all

    I have this scenario in  my app: server db sql express, client 1 db sql express, client 2 sql express. They works all offline, so in avery moment they can be synchronized.

    I have provisioned my tables with different scopes ordering them by their dependencies (first sync the parents tables then the childs in order to avoid PK conflicts).

    I noticed, in my tests, that if I insert in server a new row (the id column is autocounter) id = 1  and in client 1 another different row in the same table and unfortunately the id is set to 1, when i sync the client the two rows becomes one (the sync framework see the rows as the same). To avoid this I made a reseed in the db so the clinet 1 id will start from 1000000, the client 2 from 2000000 en so on. 

    The sync so run correctly, but i had a trouble in last sync when I made sync clinet 2 to server then sync client 1 to server, after sync all the dbs was reseeded like the client 2 (the counter of id starts from 2000000 for all dbs) and i have lost the records of client 1.

    Perhaps my architecture is not correct...

    The sync may change also the seed of db?


    Tuesday, May 31, 2011 8:53 AM


All replies

  • ID range management is not supported in syncFx. we would recommend you use GUID instead of the Identity column to aovid future issues with the ID range ( such as reseed, range assignments etc).

    in your case, you will need to reset seed at each clients ( and the server if the server side has INSERTs also ). you can refer to this post for detailed queries:




    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, June 1, 2011 2:35 PM
  • Hallo Yunwen

    thankyou for your reply.Your solution is the same I thought.

    Change the id column to GUID in a relational db whith 60 tables is not simple, but I know is most elegant solution.

    I will make a reseed every time I sync the db.


    Thank you 

    Wednesday, June 1, 2011 4:17 PM