SQL Server 和 SQL Server Express 数据库之间的同步

Synchronization between SQL Server and SQL Server Express databases

我有一个要求,即客户端数据库更改应与服务器同步(集中)。所有客户端仅使用 SQL Server Express,因为服务器是 SQL Server 2008 R2。如果没有 Microsoft Sync 框架,我们有什么办法可以做到这一点吗?使用同步框架,所有数据都从头开始,这需要更长的时间。

不知道可接受的延迟是多少,网络 latency/reliability 是什么,客户端是否 connected/disconnected,以及在客户端所做的更改是否需要发送回服务器,假设您想发送增量更改,您可以选择数据库和日志 backup/restore、事务复制和合并复制。可能还有更多,但这些是将同步两个服务器的更常见的解决方案。

如果您正在寻找双向数据流,那么 merge replication 是合适的解决方案。

Merge replication is typically used in server-to-client environments. Merge replication is appropriate in any of the following situations:

  • Multiple Subscribers might update the same data at various times and propagate those changes to the Publisher and to other Subscribers.
  • Subscribers need to receive data, make changes offline, and later synchronize changes with the Publisher and other Subscribers.
  • Each Subscriber requires a different partition of data.
  • Conflicts might occur and, when they do, you need the ability to detect and resolve them.
  • The application requires net data change rather than access to intermediate data states. For example, if a row changes five times at a Subscriber before it synchronizes with a Publisher, the row will change only once at the Publisher to reflect the net data change (that is, the fifth value).