Replicating or copying SQL server data between azure tenants

MrFlinstone 476 Reputation points
2023-03-10T00:15:01.12+00:00

We have got 2 SQL server databases on 2 separate azure tenants, one of the databases is within a private virtual network. Is there a way to copy data between the 2 tenants, ideally replicate the data in near real time? Alternatively, a once-a-day snapshot will also work as long as the process can be automated.

Any thoughts please ?

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Walisson Dias 316 Reputation points
    2023-03-10T00:50:41.47+00:00

    hi @MrFlinstone ,

    To sync Azure SQL databases between different tenants, there are a few options to consider like SQL Data Sync is a great tool for syncing databases and can be set up using PowerShell cmdlets. With the ability to schedule syncs at different intervals and support for one-directional and bi-directional syncs, SQL Data Sync is a valuable tool for many businesses.

    https://learn.microsoft.com/en-us/powershell/module/az.sql/new-azsqlsyncmember?view=azps-9.5.0

    If you need to replicate databases across different regions, you can use geo-restore and geo-secondary. However, please note that geo-restore can only be performed on databases within the same subscription. Creating a geo-secondary on a logical server in a different tenant may not be possible if Azure Active Directory only authentication is enabled.

    https://learn.microsoft.com/en-us/azure/azure-sql/database/active-geo-replication-overview?view=azuresql#cross-subscription-geo-replication

    Another option to consider is Azure Data Factory. While there are some limitations, such as not being able to share Self-Hosted Integration Runtime with other tenants, it is still possible to use Azure Data Factory to copy data between SQL Server databases on separate tenants by setting up the necessary network and authentication configurations. Using a Virtual Network (VNet) or Virtual Private Network (VPN) connection can provide secure and private communication between the databases, and using service principal authentication can enable cross-tenant access to Azure resources.

    https://learn.microsoft.com/en-us/azure/data-factory/concepts-change-data-capture#auto-incremental-extraction-in-mapping-data-flow

    1 person found this answer helpful.
    0 comments No comments