Disclaimer: Use this at your own risk! Provides an alternate way to move databases between subscriptions. These thoughts are of my own and does not reflect my workplace or any vendor.
Problem:
------------
Sometimes you need to only move one database out of one SQL Server to another server which is across subscription.
Solution:
-------------
An SQL Admin would say backup-restore is one way. As there is no direct way to copy db across subscription atm.
That is fine however when the DB size increases (> ~500GB) in Azure it becomes problematic and there are limits on API.
Workaround:
--------------------
You can come around with the following steps
- Create a new temp SQL Server in the source subscription.
- Go to source database in the azure portal.
- Use the ‘Copy’ button and choose to copy to the temp server as destination. (this can take long to copy the big database, don’t panic)
- After the temp SQL server has the new database then go to the temp SQL server.
- Use the ‘Move’ button in temp SQL server and select ‘Move to another subscription’
- Select the destination Subscription and the Destination resource group and click ok
- Go to Destination subscription resource group where you moved the new temp SQL Server and copied DB.
- Navigate to the database which you just moved.
- Use the ‘Copy’ button to copy from temp SQL server to destination SQL server. (it will allow you to rename the database before copy)
- Delete unwanted temp SQL server.
Hope this helps.
Comments
Post a Comment