Jump to content

How to move Azure SQL managed instance cross subscriptions


Recommended Posts

Guest Sabrin_Alsahsah
Posted

We have recently received a few service requests from our customers to know how to move an Azure SQL-managed instance between subscriptions. In this blog article, we will be discussing supportability, methods, and solutions that can achieve this goal, and you can decide the best for you depending on your business requirements and environment setup.

 

 

 

Currently, at this time there is no direct way to move a managed instance itself, but we can have a workaround by moving the Azure SQL managed databases across Azure SQL managed instances that are hosted\located in different subscriptions.

 

 

 

You can find the below options that can be considered if you are looking to achieve this, and please make sure to take into consideration the limitations of each method as it will depend on your environment.

 

 

 

1) Point-In-Time-Restore (PITR) cross subscription -> This method will allow you to restore a copy of your Azure SQL-managed databases (at some time in the past) to another Azure SQL-managed instance that is hosted on another subscription.

 

 

 

Taking into consideration that this method is restoring the managed database to another SQL-managed instance and while using this method you need to consider the limitations (such as both should be on the same region and same Tenant ID), you can check all the limitations by accessing this document.

 

 

 

2) Failover groups (FoG) cross subscriptions -> by creating a failover group between your source and destination Azure SQL managed instance, this will allow you to have a replicated copy of your SQL managed database on the other subscription and once the replication is completed you can failover to the second managed instance.

 

 

This option is recommended in case you would like to have minimal downtime. but, also we need to check the limitations (document) as for example, the two Azure SQL-managed instances can not be on the same Azure region.

 

 

 

For more information:

 

 

3) Export-Import -> you can as well use the export–import BACPAC to move your Azure SQL-managed database, taking into consideration that this will cause downtime depending on the size of your database.

 

 

For Azure SQL managed instance it's supported to perform this action either using SQL Server Management Studio (SSMS) or SQLPackage.

 

 

 

 

Note: the above options will be using different Azure SQL-managed instance names since we are moving the databases, which will require using a different Azure SQL-managed instance name. However, the only currently possible way to use the same Azure SQL managed instance name is by dropping and recreating the managed instances on the other subscriptions. It’s very important in this option to make sure you have backups of your Azure SQL-managed databases and that these backups are good. Also, this will take more time which is expected due to the process of dropping and recreating the Azure SQL-managed instance.

 

 

 

You can have more information by checking the below documents:

 

Management operations overview - Azure SQL Managed Instance | Microsoft Learn

 

Monitor management operations - Azure SQL Managed Instance | Microsoft Learn

 

 

 

Disclaimer

Please note that the products and options presented in this article are subject to change. This article reflects the options to move Azure SQL managed instance database cross superstitions in January 2023.

 

 

 

I hope this article was helpful to you, please feel free to share your feedback in the comments section.

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...