Monday, December 23, 2019

Data Platform Tips 26 - SQL Data Sync with Azure Databases


SQL Data Sync is an Azure Service that allows you to synchronize data between multiple SQL Databases either single directional or bi-directional. Data Sync uses hub and spoke technology to sync data. Data Sync uses a Hub Database, Sync Database and Member Databases. The minimum duration between Data Sync is 5 minutes.


Sync data between databases
  • Hub Database - One of the database needs to be defined as Hub Database and it has to be Azure SQL Database.
  • Member Databases - Rest of databases can be member databases
  • Sync Database - Contains the metadata and log for the Data Sync. The Sync Database must be in the same region as the Hub Database.

Create Azure Data Sync using Azure Portal

a) Logon to the Azure Portal

b) Navigate to the Resource Group "AAD-SQL" and create a SQL Database "sampledb"

c) Navigate to "Sync to other Databases"













d) Create a "Sync Group" if one doesn't exist already.





















e) Add the Sync Member database. The member databases can be one or many.



















f) Select the tables and columns to be sync'd from the Hub Database to the Member Database.


















g) The new Sync Group is now successfully created.









Note: Sync Agents are required to add on-premises database to the Sync Group.

No comments:

Post a Comment