简体   繁体   中英

Continuously sync an on-prem SQL Server database to an Azure SQL Instance database?

I want to continuously sync an on-premise SQL Server database to an Azure Managed SQL Instance database. When looking at options, there are many. The second database will be read only and be used for reporting.

I don't want to have to write something that does a compare, I would rather use CDC or replication. I've looked at replication, Data Factory (can CDC be used?), using CDC with SSIS, Data Sync.

I don't want to have to worry about checking if the record already exists and such, I want this to be as automated as possible.

Which option would be best and why? Pros and cons of each are appreciated.

Thank you @Dai for clearing the automated part in comment.

Secondly, you only mentioned "Azure SQL Instance database", which makes me assume you are talking about Azure SQL Managed Instance. But unfortunately, SQL Data Sync does not support Azure SQL Managed Instance at this time.

在此处输入图片说明

So, only option you have is to use Azure SQL Database.

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:

  • Hybrid Data Synchronization: With Data Sync, you can keep data synchronized between your databases in SQL Server and Azure SQL Database to enable hybrid applications. This capability may appeal to customers who are considering moving to the cloud and would like to put some of their application in Azure.

  • Distributed Applications: In many cases, it's beneficial to separate different workloads across different databases. For example, if you have a large production database, but you also need to run a reporting or analytics workload on this data, it's helpful to have a second database for this additional workload. This approach minimizes the performance impact on your production workload. You can use Data Sync to keep these two databases synchronized.

  • Globally Distributed Applications: Many businesses span several regions and even several countries/regions. To minimize network latency, it's best to have your data in a region close to you. With Data Sync, you can easily keep databases in regions around the world synchronized.

To sync the on-premises SQL database with Azure SQL database, you need to create Sync Member and Sync Agent .

You can follow the simple steps given in this tutorial by SQLShack to accomplish this task.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM