Consider the following scenario:

  • You create an application that uses Microsoft Sync Framework 2.0 to perform database synchronization on a computer.

  • You configure the application to use batching for the delivery of changes.

  • The application uses a handler to perform some actions if the ChangesApplied event is fired and if the DbSyncContext.IsLastBatch property is set to True.

  • A change fails in one of the tables that are synchronized because of a constraint violation.

  • The failed change is put in a retry queue.

In this scenario, the ChangesApplied event incorrectly occurs before the failed change is applied.

For example, table A contains a primary key that is referenced by table B as a foreign key. When a delete operation for a row in table A arrives in a batch and then a delete operation for table B arrives in another batch, the delete operation in table A fails. The operation may fail because of a foreign key violation. The delete operation in table A is put in a retry queue. However, the ChangesApplied event is incorrectly called before all the failed changes that are in the retry queue are applied. Therefore, the business logic is broken in the ChangesApplied event.


To resolve this issue, apply the following hotfix.

After you apply the following hotfix, the ChangesApplied event is called only if all changes that are in the retry queue are applied to a database.

How to obtain hotfix build 2.0.2507.00

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problems that are described in this article. Apply this hotfix only to systems that are experiencing the problems described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Note The parent build of this build is 2.00.2501.00. The parent build was released on January 29, 2010.

For more information about hotfix builds for Sync Framework 2.0, click the following article number to view the article in the Microsoft Knowledge Base (KB):

979680 Description of the Sync Framework 2.0 builds that were released after Sync Framework 2.0 was released

Hotfix package information

Installation notes

Install the following .msi files in the following sequence:

  1. Synchronization-<KB>-v2.0-<arch>-<lang>.msi

  2. ProviderServices-<KB>-v2.0-<arch>-<lang>.msi

  3. DatabaseProviders-<KB>-v2.0-<arch>-<lang>.msi

Note Install the .msi files only if you have the corresponding components installed on the computer. For example, do not install the ProviderServices-<KB>-v2.0-<arch>-<lang>.msi file if you do not have Sync Framework 2.0 Provider Services installed on the computer.

Restart information

You do not have to restart the computer after you apply this hotfix package.

Registry information

To use the hotfixes in this build, you do not have to make any changes to the registry.

File information

The .msi files that are contained in this hotfix package regenerate all the Sync Framework 2.0 DLL files. 


To work around this issue, do not use batching in the application.


For more information about how to deliver changes in batches, visit the following MSDN website:

How to deliver changes in batchesFor more information about how to use events and about how to program business logic, visit the following MSDN website:

How to use events and how to program business logic


Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!