Request design guidence - multi database sync
-
Tuesday, April 14, 2009 3:39 PM
So far, every example I've see shows a since database. What is the best design for multiple databases? Is it supported?
Example :
Database A - snapshot to client.
Database B - upload incremental inserts to the server
Database C - Download incremental inserts , updates, and deletes to client.
----------------------------------------------------------------------------------------------------------
Part A)Server
ServerSyncProvider (derives from DBServerSyncProvider) has one connection property
In a N-tier WCF environment, do I need to establish mutiple Service tags in system.serviceModel/Services, pointing to a seperate class for each database? Example :
<system.serviceModel>
<services>
<service name="CDG.DRS.Sync.DatabaseA />
<service name="CDG.DRS.Sync.DatabaseB />
<service name="CDG.DRS.Sync.DatabaseC />
Part B)Client. Do I create one adapter / database?Thanks,Peter
- Moved by Hengzhe Li Friday, April 22, 2011 3:14 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
All Replies
-
Friday, April 17, 2009 5:23 PM
Hi Everyone.
I am still waiting for a reply .
Thanks,Peter -
Monday, April 27, 2009 5:34 PM
Hi
Please answer him, I am planning to synchronize from to sources (2 different SQL Servers), does I need to use different SQL Compact DB's at the client?
Thanks
Carlos Rueda -
Wednesday, April 29, 2009 8:11 PMModeratorHi,
There aren't samples for this but here is one way you can do this. Put the tables that map to one source in one sync group on the client side. So you will have as many sync groups as there are server providers. All syncgroups will sync to the same CE database on client side but different server side databases through different server side server providers. You will have to perform one sync per sync group to sync all tables.
The reason we can not do this with one sync group is that the anchor coming down from the server provider is at the group level and we can not have one single anchor value across different databases on server side.
thanks
Sudarshan
Development Lead , Microsoft -
Monday, May 04, 2009 7:53 PM
Hi Sudarshan,
You didn't answer my question. I have multiple databases :
database A will sync from server to client.
database B will sync from server to client. etc etc
Thanks,
Peter -
Monday, May 04, 2009 8:39 PMModerator
Hi Peter,
Sorry I thought I did. Let me know if this is not what you are asking.
1] You will need one server provider per database.2] I don't have a sample but in theory you can put data from both server databases into one client database as long as there is no overlap.
Can you please elaborate on the question if I am still missing the point?
thanks
Sudarshan
Development Lead , Microsoft -
Monday, May 04, 2009 9:01 PMHi Sudarshan,
Server : database A will sync to client database A.
Server database B will sync to client database B.
etc.
Would I have multiple SyncAgents ? Or set my sync agent to null, and then new it again?
On the Server, would I have a seperate WCF endpoints for each server provider ?
Thanks,Peter
-
Thursday, May 14, 2009 5:06 AMHi Peter,
Since a SyncAgent has not only the providers (with their adapters) but also a Configuration property with table/parameter information you can't really re-use it for multiple server/client pairs.
Easiest solution is to create a new SyncAgent for each pair. The decision of whether you re-create them for each sync or keep them around and just call Synchronize() on each of them as needed will depend on your application, either works (just beware that if you're using WCF in there with proxy providers it can get messy and might be easier to re-create it each time).
Hope this helps! -
Monday, May 25, 2009 12:07 PMHi ,
Please give us one example project which conects two databases. so that every one clear!
Thanks
Lakshmi Narayana

