locked
Question about Synchronize a server to clients with different versions of Database . RRS feed

  • Question

  • I have a scenario that clients many have different version of database due to a long term off-line. For example, we add a new column to the server database, but only one client does not get the database updated.

     

    I find the sync framework wrap data into a DataTable. My solution is to handle this in “ApplyingChanges” event. If one column exist in local database, but does not in DataTable, I add this column into DataTable with null valve. This works. Since we frequently transport data through sync framework, I am afraid this kind of solution affects the performance.

     

    Please advise if you have any other solutions.

     

    Thanks!

     

    Monday, August 15, 2011 10:41 AM

Answers

  • yes this will affect performance since you are inspecting the table structure everytime you sync. if you have 100 clients, 99 of them has updated their schema, you are penalizing this 99 clients by checking the schema every time you sync.

    if i were to do it, i'd do the inspection on the ApplyChangesFailed event. if am not mistaken, Sync framework would throw an exception if the schema dont match. if an exception gets thrown, you can then inspect if its schema related and do the fix.

     

    • Marked as answer by jz2012 Wednesday, August 17, 2011 5:07 PM
    Tuesday, August 16, 2011 2:09 AM
  • Thank you very much!

    I think it is good to do the inspection on the applychangesfailed event.

    • Marked as answer by jz2012 Wednesday, August 17, 2011 5:07 PM
    Tuesday, August 16, 2011 10:16 AM

All replies

  • yes this will affect performance since you are inspecting the table structure everytime you sync. if you have 100 clients, 99 of them has updated their schema, you are penalizing this 99 clients by checking the schema every time you sync.

    if i were to do it, i'd do the inspection on the ApplyChangesFailed event. if am not mistaken, Sync framework would throw an exception if the schema dont match. if an exception gets thrown, you can then inspect if its schema related and do the fix.

     

    • Marked as answer by jz2012 Wednesday, August 17, 2011 5:07 PM
    Tuesday, August 16, 2011 2:09 AM
  • Thank you very much!

    I think it is good to do the inspection on the applychangesfailed event.

    • Marked as answer by jz2012 Wednesday, August 17, 2011 5:07 PM
    Tuesday, August 16, 2011 10:16 AM