Search code examples
azureazure-sql-databaseazure-data-sync

Do I copy a db or use data sync to create and manage a db for testing in Azure


If I want a daily copy/replication of my production database, I know I can copy, but what happens when the size grows to ~100 terabytes or more?

It doesn't seem logical to copy a db of that size everyday just to use for testing/QA.

Ideally I'd like a solution where - 1. just the changes (data) are copied (nightly) to the testing db, there by eliminating the overhead of copying a large db. 2. when I do push changes (column additions, keys, etc) to production then those changes get copied to the testing db as well.

Is there an Azure solution or setup for this?


Solution

    1. just the changes (data) are copied (nightly) to the testing db, there by eliminating the overhead of copying a large db. 2. when I do push changes (column additions, keys, etc) to production then those changes get copied to the testing db as well.

    Please reference the document of SQL Data Sync. SQL Data Sync is a service built on Azure SQL Database that lets you synchronize the data you select bi-directionally across multiple SQL databases and SQL Server instances.

    Data 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.

    You can sync the data between hub database and member datatbase manually or automatically. Please see Tutorial: Set up SQL Data Sync between Azure SQL Database and SQL Server on-premises

    Hope this helps.