Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy SQL Azure Database to different Server

SQL Azure database supports copying whole database asynchronously with a single command as below:

I have been using to copy database within same server using

CREATE DATABASE [targetdb] AS COPY OF [sourcedb]

But when I try to copy database to a different SQL Azure server:

CREATE DATABASE [targetdb] AS COPY OF [source_sql_azure_server].[sourcedb]

But I get below error:

Cannot open server "source_sql_azure_server" requested by the login. The login failed.

How do I copy?

like image 205
Abhijeet Avatar asked Jun 04 '14 04:06

Abhijeet


People also ask

Can I copy SQL database to another server?

You can use the Copy Database Wizard to copy or move databases between servers or to upgrade a SQL Server database to a later version. For more information, see Use the Copy Database Wizard. To copy an entire database, you can use the BACKUP and RESTORE Transact-SQL statements.

How do I move Azure to another SQL Server?

In the Azure portal, search for resource mover. Then, under Services, select Azure Resource Mover. In Overview, click Get started. In Move resources > Source + destination, select the source subscription and region.


1 Answers

Although this question is very old, it's the one I came across when trying to find out if I could easily copy an Azure SQL database from one server to another.

It turns out that it's now as simple as navigating to the source database from http://portal.azure.com then clicking copy and choosing the new destination server.

The whole process is explained in more detail in this article: https://azure.microsoft.com/en-us/documentation/articles/sql-database-copy/

like image 129
Adam Goodwin Avatar answered Oct 29 '22 16:10

Adam Goodwin