0

Good Day Everyone, Excuse the newbie question, I am new to Microsoft Sync Framework. I've done extensive research on the Internet in order to find my way in this puzzle with the different versions of Sync Framework, of SQL Server, of Sync Services for ADO.NET, of SyncAgent vs SyncOrchestrator, etc. etc. and what should be used in which type of scenario. Unfortunately, after about a week of struggling all day long with how to code my ASP.NET 2.0 C# web application right, I am still lost.

My current situation is this: I am developing applications for a large Department and I cannot expect to get approval for installing new stuff on the server side. I am stuck with SQL Server 2008 and (I believe), the server has Sync Framework 1.0 installed on it. However, I have the freedom to install later versions on the client computers that will connect to the server. These will have SQL Server 2008 Express (NOT Compact) and will each run the web app. in their localhost IIS. The synchronization model is centralized in that the clients will only connect to the server for bidirectional synchronization (in a star-shaped network topology, do we call this the hub-spoke model?) but will not connect to each other (no peer-to-peer collaboration).

I have prepared both sides of the database for synchronization (enabled Change Tracking, put GUID data type for Primary Keys, etc. etc.)

The core of the synchronization, the program that makes the interface between the two nodes to synchronize, seem to be exclusively the web application on the client side. Right?

QUESTION: If I want to use Sync Framework v2.0 or v2.1, can I just ignore what version is installed on the server? In other words, is the Sync Framework on the server side even doing something? The SQL Server does not have the web application installed on it.

Unfortunately I could not find answer to this rather simple question on the web! Thanks very much for your help! Have a great day! Kindest Regards, Zyxy

Zyxy
  • 37
  • 7

2 Answers2

1

No, you don't need to install sync framework on the central sever. All you need from the central database is a connection string. As long as you can access the central database with a login that has sufficient rights, then you don't need to install anything on it. The sync application can run from anywhere as long as it is able to connect to the central server.

Shadi S
  • 116
  • 1
  • 4
  • Thanks Shadi. I managed to write a small console app. to provision a scope on the main server's db. The app. was run from a client PC using Sync Fx 2.1. I was also successful synching the client and server db with the sync session entirely being hosted/executed by the client. You were right! – Zyxy Nov 08 '12 at 18:17
0

depends how you build your application.

if all sync code is on your app and you simply point it to connect the central sql server, then no need to have sync framework on the server.

if however you decide to use WCF such that you have a service component of the sync on the server side, then you need sync framework on the server. you client will have a proxy for the server side service and part of the synchronization will be executed server side on the wcf service.

with regards to SQL Express on the client side, SQL Ce is the only supported client database is you use VS Local Database Cache Project item or if you manually code against the SyncAgent/SQLCeClientSyncProvider/DbServerSyncProvider.

if you use SQL Express, you will have to use the newer SyncOrchestrator/SqlSyncProvider combo but that doesnt use the built-in SQL Change tracking.

JuneT
  • 7,840
  • 2
  • 15
  • 14
  • Hi JuneT, my little experience with Sync Fx (also fairly new to .NET as well) does not allow to fully comprehend all elements in your answer. However, something really, REALLY surprises me though! SyncOrchestrator/SqlSyncProvider combo is what I successfully used to sync client and server, I did enabled change tracking on my database too (ALTER DATABASE DatabaseName SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 365 DAYS, AUTO_CLEANUP = ON) you mean this last SQL line is totally useless when I am synching from C# SyncOrchestrator?? I had a hard time voting for answer. Can I 50-50 between two? – Zyxy Nov 08 '12 at 18:33
  • yes, totally useless. the SqlSyncProvider uses its own custom change tracking (triggers + _tracking tables). – JuneT Nov 09 '12 at 00:07