Cross Subscription Copying of Databases on Windows Azure SQL Database
You can just do a backup (Export) to blob storage and then Import it in the new subscription.
http://msdn.microsoft.com/en-us/library/f6899710-634e-425a-969d-8db1267e9471
Update: If you can use SSMS, this answer is right. I only want to add some details.
- You can export the source database into storage in Azure Portal.
- After exporting, you can find the bacpac file.
- Open SSMS, and connect to the destination server.
- Right click the node Database and select Import Data-tier Application
- Then you can choose import the database from local disk or Azure storage.
- After that, you have copied the database from source to destination.
For anyone landing here, it does appear to be possible to use CREATE DATABASE newDB AS COPY OF [server].[olddb] ( OPTION [, OPTION ...] )
even when the servers are in different subscriptions.
See more at Create Database (Azure SQL Database) - MSDN
Example from MS Docs:
CREATE DATABASE db_copy AS COPY OF ozabzw7545.db_original ( SERVICE_OBJECTIVE = 'P2' ) ;
In my setup I have the admin account and password (login) the same on both servers - that probably helps. Operation will fail if you don't have admin permissions on original server.
I have found through testing that I am not able to change the Edition from Standard to Premium despite including the 'Edition' option - I'm not sure why that is.
I have created copies of databases across Azure subscriptions successfully. Here are the steps -
On the target Azure subscription create a database server (if you haven't already created one), and on that create a new DB (any name, doesn't matter) but with the same password as the source database on your source Azure subscription. For me it didn't work with different passwords, so I just went ahead with using the same, but I am sure there is a way to make it work with different passwords as well.
Run this on the newly created database in your target Azure -
CREATE DATABASE NEWDBNAME
AS COPY OF [Source Azure Server Name here].[source DB]
Let Azure handle the new DB pricing tier (Basic, Standard etc), because you can immediately change it from the portal after the DB is created. In my case the target DB was created with the same pricing tier as the source DB. Also, the server names in azure are usually - NAME.database.windows.net. So in your source name above, just put NAME.
Now on your target Azure subscription you will have 2 databases on the new DB server. One which was created in step 1 and the other in step 2 which is the actual copy. You can go ahead and safely delete the one which you don't need.
If you want to copy other source DBs to the same target server created in 1 above, just run the same command again.