Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate Microsoft Fabric, Power BI, SQL, and AI community-led event. March 31 to April 2, 2025.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: Azure SQL Database
Important
SQL Data Sync will be retired on 30 September 2027. Consider migrating to alternative data replication/synchronization solutions.
This article describes how to troubleshoot known issues with SQL Data Sync in Azure. If there is a resolution for an issue, it's provided here.
For an overview of SQL Data Sync, see What is SQL Data Sync for Azure?
SQL Data Sync does not support Azure SQL Managed Instance or Azure Synapse Analytics.
Sync fails in the SQL Data Sync portal UI for on-premises databases that are associated with the client agent. On the local computer that's running the agent, you see System.IO.IOException
errors in the Event Log. The errors say that the disk has insufficient space.
Cause. The drive has insufficient space.
Resolution. Create more space on the drive on which the %TEMP% directory is located.
A sync group in SQL Data Sync has been in the processing state for a long time. It doesn't respond to the stop command, and the logs show no new entries.
Any of the following conditions might result in a sync group being stuck in the processing state:
Cause. The client agent is offline
Resolution. Be sure that the client agent is online and then try again.
Cause. The client agent is uninstalled or missing.
Resolution. If the client agent is uninstalled or otherwise missing:
Cause. The SQL Data Sync service is stopped.
Resolution. Restart the SQL Data Sync service.
Note
If the preceding information doesn't move your sync group out of the processing state, Microsoft Support can reset the status of your sync group. To have your sync group status reset, in the Microsoft Q&A question page for Azure SQL Database, create a post. In the post, include your subscription ID and the sync group ID for the group that needs to be reset. A Microsoft Support engineer will respond to your post, and will let you know when the status has been reset.
If tables that have the same name but are from different database schemas are included in a sync, you see erroneous data in the tables after the sync.
Cause. The SQL Data Sync provisioning process uses the same tracking tables for tables that have the same name but are in different schemas. Because of this, changes from both tables are reflected in the same tracking table. This causes erroneous data changes during sync.
Resolution. Ensure that the names of tables that are involved in a sync are different, even if the tables belong to different schemas in a database.
A sync is reported as successful, and the log shows no failed or skipped rows, but you observe that primary key data is inconsistent among the databases in the sync group.
Cause. This result is by design. Changes in any primary key column result in inconsistent data in the rows where the primary key was changed.
Resolution. To prevent this issue, ensure that no data in a primary key column is changed. To fix this issue after it has occurred, delete the row that has inconsistent data from all endpoints in the sync group. Then, reinsert the row.
Your performance degrades significantly, possibly to the point where you can't even open the Data Sync UI.
Cause. The most likely cause is a sync loop. A sync loop occurs when a sync by sync group A triggers a sync by sync group B, which then triggers a sync by sync group A. The actual situation might be more complex, and it might involve more than two sync groups in the loop. The issue is that there is a circular triggering of syncing that's caused by sync groups overlapping one another.
Resolution. The best fix is prevention. Ensure that you don't have circular references in your sync groups. Any row that is synced by one sync group can't be synced by another sync group.
This error message indicates that one of the two following issues has occurred:
Data Sync doesn't handle circular references. Be sure to avoid them.
To troubleshoot issues with the client agent, see Troubleshoot Data Sync Agent issues.
Cause. The "disk out of space" message might appear if leftover files need to be deleted. This might be caused by antivirus software, or files are open when delete operations are attempted.
Resolution. Manually delete the sync files that are in the %temp% folder (del \*sync\* /s
). Then, delete the subdirectories in the %temp% folder.
Important
Don't delete any files while sync is in progress.
Your attempt to delete a sync group fails. Any of the following scenarios might result in failure to delete a sync group:
Cause. The client agent is offline.
Resolution. Ensure that the client agent is online and then try again.
Cause. The client agent is uninstalled or missing.
Resolution. If the client agent is uninstalled or otherwise missing:
a. Remove the agent XML file from the SQL Data Sync installation folder, if the file exists.
b. Install the agent on an on-premises computer (it can be the same or a different computer). Then, submit the agent key that's generated in the portal for the agent that's showing as offline.
Cause. A database is offline.
Resolution. Ensure that your databases are all online.
Cause. The sync group is provisioning or syncing.
Resolution. Wait until the provisioning or sync process finishes and then retry deleting the sync group.
Cause. Most likely, you are trying to unregister a database that has already been deleted.
Resolution. To unregister a SQL Server database, select the database and then select Force Delete.
If this operation fails to remove the database from the sync group:
Cause. This error occurs in two situations:
Resolution. Grant log-on-as-a-service credentials to the user account:
Cause. SQL Data Sync removes databases that have been offline from the service for 45 days or more (as counted from the time the database went offline). If a database is offline for 45 days or more and then comes back online, its status is Out-of-Date.
Resolution. You can avoid an Out-of-Date status by ensuring that none of your databases go offline for 45 days or more.
If a database's status is Out-of-Date:
Warning
You lose all changes made to this database while it was offline.
Cause. If one or more changes fail to apply for the whole retention period of 45 days, a sync group can become outdated.
Resolution. To avoid an Out-of-Date status for a sync group, examine the results of your sync jobs in the history viewer on a regular basis. Investigate and resolve any changes that fail to apply.
If a sync group's status is Out-of-Date, delete the sync group, and then re-create it.
You can't delete a sync group within three minutes of uninstalling or stopping the associated SQL Data Sync client agent.
Resolution.
If you restore a lost or corrupted database from a backup, there might be a non-convergence of data in the sync groups to which the database belongs.
If you receive the error message Sync0022 Customer does not have authorization to perform action 'syncGroupOperationResults/read'
, the account attempting the operation does not have sufficient subscription-level permissions. Add:
For more information, see Resource provider operations RBAC and SQL Data Sync Database accounts with least required privileges.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate Microsoft Fabric, Power BI, SQL, and AI community-led event. March 31 to April 2, 2025.
Register today