Copy SQL Azure Database to different Server

15,668

Solution 1

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/

Solution 2

To execute DB copy between 2 different servers you must be connected to the master database of the destination SQL Azure server and have correct permissions.
The exact same login/password must exist on the source server and destination server and the login must have db_owner permissions on the source server and dbmanager on the destination server.

Read more about it here: http://msdn.microsoft.com/en-us/library/ff951624.aspx

Share:
15,668
Abhijeet
Author by

Abhijeet

Updated on July 23, 2022

Comments

  • Abhijeet
    Abhijeet almost 2 years

    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?