Sync: dynamic Databases (SQL Server 2008) RRS feed

  • Question

  • Hi everyone,

    I have a small and simple question.

    I have two databases. One is the Server database (SQL Server 2008) and the other the client db (SQL-Server-Express) and I use the Sync Framework in the Version 2.1.
    Synchronization between these two db's is not the problem but what happened when I add a few new tables into the Server database? Can the Sync Framework handle this kind of changes? What I want to create is a fully dynamic Database which synchronies changes on tables too. Is this possible? If is it not, what other options exists where I don’t have to write new code lines for every new table?

    Hope someone has an idea.


    Sunday, October 24, 2010 1:33 PM


  • I'm assuming you're using the collaboration provider (SqlSyncProvider). the collaboration providers doesnt automatically handle table addition/removal nor does it automatically support schema changes as well. So if you have provisioned a scope and you decide to change the schema or add/remove a table, Sync Fx doesnt allow you to modify the scope definition. You will have to deprovision the old scope and create a new one with your additional table. The problem with this though is that your client already has data and when you try to sync the first time, the previously downloaded/existing data in your client will be uploaded and applied to the server which would cause conflicts to be raised.

    addition/removal of tables is easily handled using the offline providers as you can easily add/remove tables from the SyncTable collection. however, there is no out-of-the-box provider for SQL Express.

    Monday, October 25, 2010 2:03 AM