开发者

Synchronizing Entire Databases using Microsoft Sync Framework 2.1

I need the ability to sync multiple remote databases, upload and download, with my main database.

However, the problem lies in the fact that I need to sync the entire database, and the database schema is going to be being updated constantly, and I didn't see any way to code it to grab the entire database schema without adding each individual table to the SyncScope.

This is problematic as that scope will always be changing. I solved the initial problem of removing the existing scope, and adding a new one, but I still cannot find any simple solutions, without querying system tables, and parsing the results, and passing those results (for 150+) tables back to my SyncScope.

The reasons I originally looked at Sync Framework are:

  1. I need to be able to manage the direction of the sync (upload/download) when I do a sync programatically from C# on a button click.
  2. I need the ability to turn on that button, based off their network connectivity.
  3. There's additional tasks that need to be done on a sync download, such as changing connection strings of the mobile units, and storing information about their connection and unit in the database.
  4. There's additional tasks that need to be run on a sync upload, such as verifying data against customer business rules through my OR/M, archiving the data to a network开发者_如何转开发 storage, restarting the application, and changing connection strings again.
  5. Eventually, I need partial data sets, decided/chosen by the customer, at run-time, at the object level, in an OR/M framework. These objects, may coincide with one or more tables I won't know of at design-time, or may not even exist at design-time.

Does anyone know if another framework encompasses all my requirements, or if there is a simpler way to do this in the sync framework?


For this task, especially with a changing schema, you could consider Merge Replication instead of the Sync framework.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜