Synching schema changes between SqlCe and Sql Server 2005 RRS feed

  • Question

  • Experiencing some problems trying to sync table schema changes down to the SqlCe database. During the initial synchronization, it obviously builds out the schema. I add a column to the server and I expect that column to be added to the SqlCe table during next synchronization. It doesn't. On the SyncTable I set the CreationOption to DropExistingOrCreateNewTable. It appears for some reason during subsequent synchronizations, it doesn't do this. Any help would be appreciated.

    Thursday, January 28, 2010 8:29 PM


All replies

  • The recommended way is to re-create the SQLCE client database. 

    However, there is a possibility that you made changes already on the client DB from last sync.
    What you can do is to call ClientProvider.GetChanges(...) to retrieve the current local change and set it aside.  Then re-initialize the client DB and then re-apply the changes you have got in the last step.

    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, January 29, 2010 6:02 AM
  • Craig,

    The Sync framework does not support schema changes automatically. Please look at these articles for more information.

    This posting is provided AS IS with no warranties, and confers no rights
    Monday, February 1, 2010 5:02 AM
  • Hi,

        We can able to do schema changed database using sync frame work. If there any schame changes happening, we need to remove all objects related to previous sync then it will can sync successfully. Below are the codes for deprovisioning schema changed database,

         SqlSyncScopeDeprovisioning deprovisioningvar = new SqlSyncScopeDeprovisioning(sqlServerConn);


         For more details about the code please refer the link


    • Proposed as answer by SanojPareethu Thursday, May 12, 2011 6:43 AM
    Thursday, May 12, 2011 4:20 AM