how to copy Azure SQL server from one region to another region

Lakshmi Narayanan 71 Reputation points
2021-08-23T08:36:12.363+00:00

HI,
I have a Azure SQL serverless with four databases in Production environment. Here, Customer asks us to copy all databases from Production to Preproduction environment. Production environment in North Central US whereas Preproduction in South Central US. How to copy all databases from Prod to Preprod ? Is there any way to take snapshot and copy to Preprod SQL server? In AWS, we have option to take snapshot and copy to any other region then make this snapshot as RDS instance. Same can we have any option in Azure SQL Serverless? Kindly advice on this.

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Anurag Sharma 17,571 Reputation points
    2021-08-23T10:12:35.713+00:00

    Hi @Lakshmi Narayanan , welcome to Microsoft Q&A forum.

    You can use the copy database feature as mentioned in the below screenshot. Using this feature you can copy the database across servers, regions etc. We can also use PowerShell commands or Azure CLI to achieve the same. However, this is one database at a time approach. So if we need to copy multiple database, we can repeat the process by pointing to same target server.

    125604-image.png

    Below is the article that talks about the same in details:

    Copy a transactionally consistent copy of a database in Azure SQL Database

    Please let me know if this helps or else we can discuss further on the same.

    ----------

    If answer helps, you can mark it 'Accept Answer'


  2. Alberto Morillo 32,886 Reputation points MVP
    2021-08-23T10:45:05.257+00:00

    You just have to create the other Azure SQL logical server on the second region and copy all of them with a PowerShell script:

    New-AzureRmSqlDatabaseCopy -ResourceGroupName rg-resourcegroupname -ServerName sql-servername
    -Tags @{key="value"} -DatabaseName sqldb-databasename
    -CopyResourceGroupName rg-resourcegroupname -CopyServerName sql-servername
    -CopyDatabaseName sqldb-databasename-copy
    

    This article can give your more details.