question

LakshmiNarayanan-5070 avatar image
0 Votes"
LakshmiNarayanan-5070 asked SaurabhSharma-msft commented

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

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
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @LakshmiNarayanan-5070, please let us know if you need any more details. If answer helped, you can mark it as 'Accept Answer'

0 Votes 0 ·
AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered SaurabhSharma-msft commented

Hi @LakshmiNarayanan-5070, 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'





image.png (75.6 KiB)
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HI @AnuragSharma-MSFT Many thanks for your response. I had a look. My production SQL serverless resides at North Central US. So i trying to copy database from Azure portal as you were mentioned. But it doesn't allow me to proceed. I have attached a screenshot. Please have a look.125555-azure-sql-copy-1.png


0 Votes 0 ·

Hi @LakshmiNarayanan-5070, thanks for replying back and apologies for the trouble you are facing.

Actually in certain regions we need to go through Support ticket to enable/gain access. Below article mentions the exact steps we need to take to gain access.

Azure region access request process

Please let us know if you have any queries related to the same. Meanwhile for testing purpose if you would like, you can create a free account and try to copy database to other regions and check if that meets your requirements or not.

0 Votes 0 ·

Thanks, I will take a look.

0 Votes 0 ·
Show more comments

125556-azure-sql-copy-1.pngHI @AnuragSharma-MSFT , Many thanks for your response. I had a look. My production SQL serverless resides at North Central US. So i trying to copy database from Azure portal as you were mentioned. But it doesn't allow me to proceed. I have attached a screenshot. Please have a look.


0 Votes 0 ·
AlbertoMorillo avatar image
0 Votes"
AlbertoMorillo answered LakshmiNarayanan-5070 commented

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.




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HI @AlbertoMorillo , Sure i will check this one and update here

1 Vote 1 ·