Applies to: Azure SQL Database
SQL Data Sync is a service built on Azure SQL Database that lets you synchronize the data you select bi-directionally across multiple databases, both on-premises and in the cloud.
Azure SQL Data Sync does not support Azure SQL Managed Instance or Azure Synapse Analytics.
OverviewData Sync is based around the concept of a sync group. A sync group is a group of databases that you want to synchronize.
Data Sync uses a hub and spoke topology to synchronize data. You define one of the databases in the sync group as the hub database. The rest of the databases are member databases. Sync occurs only between the hub and individual members.
A sync group has the following properties:
Data Sync is useful in cases where data needs to be kept updated across several databases in Azure SQL Database or SQL Server. Here are the main use cases for Data Sync:
Data Sync isn't the preferred solution for the following scenarios:
How it worksThe new private link feature allows you to choose a service managed private endpoint to establish a secure connection between the sync service and your member/hub databases during the data synchronization process. A service managed private endpoint is a private IP address within a specific virtual network and subnet. Within Data Sync, the service managed private endpoint is created by Microsoft and is exclusively used by the Data Sync service for a given sync operation.
Before setting up the private link, read the general requirements for the feature.
Note
You must manually approve the service managed private endpoint in the Private endpoint connections page of the Azure portal during the sync group deployment or by using PowerShell.
Get started Set up Data Sync in the Azure portalSince Data Sync is trigger-based, transactional consistency isn't guaranteed. Microsoft guarantees that all changes are made eventually and that Data Sync doesn't cause data loss.
Performance impactData Sync uses insert, update, and delete triggers to track changes. It creates side tables in the user database for change tracking. These change tracking activities have an impact on your database workload. Assess your service tier and upgrade if needed.
Provisioning and deprovisioning during sync group creation, update, and deletion might also affect the database performance.
Requirements and limitations General requirementsImportant
Changing the value of an existing primary key will result in the following faulty behavior:
Snapshot isolation must be enabled for both Sync members and hub. For more info, see Snapshot Isolation in SQL Server.
In order to use Data Sync private link, both the member and hub databases must be hosted in Azure (same or different regions), in the same cloud type (for example, both in public cloud or both in government cloud). Additionally, to use private link, Microsoft.Network
resource providers must be Registered for the subscriptions that host the hub and member servers. Lastly, you must manually approve the private link for Data Sync during the sync configuration, within the "Private endpoint connections" section in the Azure portal or through PowerShell. For more information on how to approve the private link, see Tutorial: Set up SQL Data Sync between databases in Azure SQL Database and SQL Server. Once you approve the service managed private endpoint, all communication between the sync service and the member/hub databases happen over the private link. Existing sync groups can be updated to have this feature enabled.
.
), left square bracket ([
), or right square bracket (]
).! " # $ % ' ( ) * + -
or space.dbo.customers
and sales.customers
) only one of the tables can be added into sync.Foo
and foo
), Data Sync won't support this scenario.IGNORE_DUP_KEY
or the WHERE
filter predicate, aren't supported and the destination index is provisioned without these properties even if the source Index has these properties set.Data Sync can't sync read-only or system-generated columns. For example:
Note
There might be up to 30 endpoints in a single sync group if there is only one sync group. If there is more than one sync group, the total number of endpoints across all sync groups cannot exceed 30. If a database belongs to multiple sync groups, it is counted as multiple endpoints, not one.
Network requirementsNote
If you use Sync private link, these network requirements do not apply.
When the sync group is established, the Data Sync service needs to connect to the hub database. When establishing the sync group, the Azure SQL server must have the following configuration in its Firewalls and virtual networks
settings:
Once the sync group is created and provisioned, you can then disable these settings. The sync agent connects directly to the hub database, and you can use the server's firewall IP rules or private endpoints to allow the agent to access the hub server.
Note
If you change the sync group's schema settings, you will need to allow the Data Sync service to access the server again so that the hub database can be re-provisioned.
Region data residencyIf you synchronize data within the same region, SQL Data Sync doesn't store/process customer data outside that region in which the service instance is deployed. If you synchronize data across different regions, SQL Data Sync replicates customer data to the paired regions.
FAQ about SQL Data Sync How much does the SQL Data Sync service cost?There's no charge for the SQL Data Sync service itself. However, you still collect data transfer charges for data movement in and out of your SQL Database instance. For more information, see data transfer charges.
What regions support Data Sync?SQL Data Sync is available in all regions.
Is an Azure SQL Database account required?Yes. You must have an Azure SQL Database account to host the hub database.
Can I use Data Sync to sync between SQL Server databases only?Not directly. You can sync between SQL Server databases indirectly, however, by creating a Hub database in Azure, and then adding the on-premises databases to the sync group.
Can I configure Data Sync to sync between databases in Azure SQL Database that belong to different subscriptions?Yes. You can configure sync between databases that belong to resource groups owned by different subscriptions, even if the subscriptions belong to different tenants.
Data Sync does not support cross-cloud synchronization.
Can I use Data Sync to seed data from my production database to an empty database, and then sync them?Yes. Create the schema manually in the new database by scripting it from the original. After you create the schema, add the tables to a sync group to copy the data and keep it synced.
Should I use SQL Data Sync to back up and restore my databases?It isn't recommended to use SQL Data Sync to create a backup of your data. You can't back up and restore to a specific point in time because SQL Data Sync synchronizations aren't versioned. Furthermore, SQL Data Sync doesn't back up other SQL objects, such as stored procedures, and doesn't do the equivalent of a restore operation quickly.
For one recommended backup technique, see Copy a transactionally consistent copy of a database in Azure SQL Database.
Can Data Sync sync encrypted tables and columns?Yes. SQL Data Sync supports configuring collation settings in the following scenarios:
Federation Root Database can be used in the SQL Data Sync Service without any limitation. You can't add the Federated Database endpoint to the current version of SQL Data Sync.
Can I use Data Sync to sync data exported from Dynamics 365 using bring your own database (BYOD) feature?The Dynamics 365 bring your own database feature lets administrators export data entities from the application into their own Microsoft Azure SQL database. Data Sync can be used to sync this data into other databases if data is exported using incremental push (full push isn't supported) and enable triggers in target database is set to yes.
How do I create Data Sync in Failover group to support Disaster Recovery?SQL Data Sync offers no automatic failover or disaster recovery capabilities. In case of database failover to another region, Sync Group will stop working. Manually re-create the Sync Group in failover region with same settings as primary region.
Monitor and troubleshootIs SQL Data Sync doing as expected? To monitor activity and troubleshoot issues, see the following articles:
Learn more about Azure SQL DatabaseFor more info about Azure SQL Database, see the following articles:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4