We will add to and update this article as new issues are discovered and/or workarounds change.
"Sync failed with exception There was an error while trying to deserialize parameter www.microsoft.com/.../05:GetBatchInfoResult. Please see InnerException for more details.
Inner exception message: Type 'Microsoft.Synchronization.ChangeBatch' is an invalid collection type since it does not have a default constructor."
This is an issue with the SQL Azure Data Sync Preview.
The most likely cause is:
Make sure that you install the local agent on a machine that is not running Windows 8 Developer Preview and that the .NET Framework 4.5 is not installed.
AgentServiceSetup.msi does not check for an existing AgentConfigData.xml file before creating it. When it creates a new AgentConfigData.xml file the existing file is overwritten and all the endpoints are lost. There is no issue the first time you run the .msi
file since there is no AgentConfigData.xml file to overwrite.
To avoid losing all your endpoint registrations make a backup copy of your AgentConfigData.xml file in another directory or with a different file name (AgentConfigData.xml.bkup). After the .msi file finishes, copy your backup file over the new AgentConfigData.xml
file. Be sure to copy the backup over the new file before you use AgentConfig.exe to add any additional endpoints or you'll have two sets of endpoints, one in the new file and another in the backup, and you don't want that.
The most likely cause of a SQL Server database not appearing in the dropdown is that it is not registered with the client agent.
The solution is to register the missing database with the client agent.
Error 1069 Dialog
The fix is quite simple, update the Agent's password to your current server password.
The solution is to manually delete the sync files under %temp% (del *sync* /s) then remove the subdirectories as well.
Any of the following can result in a failure to delete a sync group.
The agent is offline.
Be sure that the agent is online then try again.
The Data Sync service is stopped.
A database is offline.
Check your SQL Azure and SQL Server databases to be sure they are all online.
The sync group is provisioning or synchronizing.
Wait until the provisioning or synchronizing process finishes then retry deleting the sync group.
In order to unregister a database it must exist. Therefore, to unregister a deleted database you must:
Key Submission Failure Dialog
Before proceeding make sure that one of the following conditions is not the reason for your issue. Make sure that:
The agent key uniquely identifies each local agent. The key must meet two conditions for it to work:
If your agent is not working it is because one or both of these conditions were not met. To get your agent to work again:
c:\program files (x86)\microsoft sql azure data sync\
This error occurs in two situations:
Grant logon-as-a-service credentials to the user account.
There could be any of a number of causes for the failure. You need to look at the logs to determine the specific cause for this failure.
To find the specific cause for the failure you experienced you need to generate and look at the Windows Installer logs. When you downloaded the MSI file is available. You can turn on logging from the command line. For sake of illustration assume that the downloaded
.msi file is LocalAgentHost.msi. Generate and examine log files using the following command lines:
msiexec.exe /i LocalAgentSetup.msi /l*v LocalAgentSetup.InstallLog
msiexec.exe /x LocalAgentSetup.msi /l*v LocalAgentSetup.InstallLog
You can enable logging for all installations performed by Windows Installer. Microsfot KB article (http://support.microsoft.com/kb/223300 provides a one-click solution to turn on logging for Windows Installer.
It also provides the location of these logs.
SQL Azure Data Sync cleans up your offline databases once every 45 days (as counted from the time the database went offline). If a database is offline for 45 or more days and then comes back online its status is set to "Out-of-Date".
You can avoid an "Out-of-Date" status by making sure that none of your databases go off line for 45 or more days.
If a database's status is "Out-of-Date" you need to:
Remove the "Out-of-Date" database from the sync group.
Add the database back in to the sync group. See the topic SQL Server Data Sync Add SQL Server Database to the Sync Group or
SQL Server Data Sync Add SQL Azure Database to the Sync Group.
You can enable logging for all installations performed by Windows Installer. Microsoft KB article (http://support.microsoft.com/kb/223300 provides a one-click solution to turn on logging for Windows Installer.
It also provides the location of these logs.
The SQL Azure Data Sync provisioning process uses the same tracking tables for tables with same name but in different schemas. As a result, changes from both tables are reflected in the same tracking table, thus causing erroneous data changes during sync.
Ensure that the names of tables involved in sync are different even if they belong to different schemas.
The most likely cause is a
Synchronization Loop. A synchronization loop occurs when a synchronization by sync group A triggers a synchronization by sync group B, which in turn triggers a synchronization by sync group A. The actual situation may be more complex, involving more than
two sync groups in the loop, but the significant factor is that there is a circular triggering of synchronizations caused by sync groups overlapping one another.
The best fix is prevention. Ensure that you do not have circular references in your sync groups. Any row that is synchronized by one sync group cannot be synchronized by another sync group.
The local agent cannot be deleted because the unreachable database is still registered with the agent and when you try to delete the agent, the deletion process tries to reach the database, which fails. This database cannot be unregistered too, because during
unregistration process, local agent tries to connect to database which cannot be reachable.
Create a local database with the same name as the one that cannot be reached, unregister this database from local agent, and then proceed to delete the agent.
Remove a sync group with associated sync agents online (strongly recommended).
If agent is offline but installed, bring it online on the on-premise computer, wait for the status of the agent as online in Azure portal, and then remove the sync group.
If agent is offline because it was uninstalled, perform the following steps and try deleting the sync group.
Remove agent XML file from the SQL Azure Data Sync installation folder if the file exists
Install the agent on same/another on-premise machine, submit agent key from portal generated for the agent that’s showing offline