Search code examples
sql-serverdatabasemicrosoft-sync-framework

Columns added to table do not synchronise


I'm working with the Microsoft Sync Framework. I have a client database and a server database, and every once in a while they synchronize with each other. No failures or anything.

However when I add new columns on the server in some tables, these don´t get synchronized. If I then delete the scope, it gets recreated and the new columns are then part of the new scope, but when I start the synchronization, it says "Invalid ColumnName 'XY'".

I could possibly go to the client and just add the columns there, but this is definitely not the best way to do it.

Also, when I add new tables on the server, they don't want to go inside the scope. So far just changing the scope would be an opportunity but, I'm missing on line in the scope:

 <Adapter Name="[tblnewTable]" GlobalName="[tblnewTable]" TrackingTable="[tblnewTable_tracking]" SelChngProc="[tblnewTable_selectchanges_0e06c509-3402-4898-b8e6-cc8885fa8c35]" >

I'm not quite sure where this random number comes from, since it is in every adapter name of the Scope.

I couldn't find anything on the Microsoft Library, so maybe someone has an answer to one of these questions:

Is there a simple way to add new columns to the synchronization? How to get new tables into the scope?

EDIT: I figured it out using this blog entry: http://myazurejourney.blogspot.de/2010/06/how-to-re-provision-scope-in-microsoft.html#comment-form

I configured the Databases on both sides, Client and Server, then i Reprovisioned a complete new Scope by using the Functions in the Blog posted above. Now it works.


Solution

  • Adding a new object whether it is for a new column or a new table etc. requires you change the existing scope info xml data. I did the same thing following this blog: https://jtabadero.wordpress.com/2011/04/28/modifying-sync-framework-scope-definition-part-4-workarounds-adding-a-table-to-an-existing-scope/