如何确保使用 Microsoft Sync Framework 同步成功?

How to make sure synchronization using the Microsoft Sync Framework was successful?

我正在使用 Microsoft Sync Framework to synchronize a table on two Microsoft SQL Servers. I have created a test application which generates one row per second in the table on the remote server. The application making use of the Sync Framework runs on the local server. The test application created about 52000 entries in the database over one night. The syncing application executed a call to the SyncOrchestrator.Synchronize Method every 15 seconds. When I checked the outcome of the synchronization application by executing a count statement on the synchronized table and the remote table, the result was that 295 rows were missing in the synchronized table. I used the tablediff Utility 来确定缺失行的 ID,然后使用这些 ID 查询跟踪 table。在远程数据库上,跟踪 table 中每个丢失的 ID 都有一个条目,而在本地数据库上,跟踪 table 中找不到丢失行的 ID。当我重新启动同步应用程序时,丢失的条目也不会更新。我以为 Sync Framework 会自动解决这些不一致问题,但不幸的是我似乎错了。

是否有任何内置方法可用于验证同步过程是否已成功进行?是否有其他验证数据一致性的方法?

当 DML 和同步 运行 同时进行时,更改枚举会出现问题。看看这个 hotfix 是否有帮助。