skip to Main Content

how to migrate an azure sql database to another subscription in the same tenant

Scenario: I have a database server with approximately 600 databases in subscription A , I want to migrate some databases to subscription B in multiple new resource groups in the same tenant. what are the best ways that involve less downtime

What I don’t want:

  1. I will not migrate the server just the databases.
  2. it is also not feasible to export bank by bank to storage acount and import the new subscription.

I thought of azure sql replication as a solution, but I didn’t find how to do it between subscription

New-AzSqlDatabaseSecondary -PartnerResourceGroupName $secondaryResourceGroupName -PartnerServerName $secondaryServerName
-PartnerDatabaseName $database.DatabaseName -SecondaryElasticPoolName $secondarypoolname
-ResourceGroupName $primaryResourceGroupName -ServerName $primaryServerName
-BackupStorageRedundancy $BackupRedundanceLocal `
-AllowConnections "All"

The items that I found on stackoverflow also migrate sql server and that I can’t do

2

Answers


  1. Please go to the Resource Group and select the databases you want to move only.

    enter image description here

    Now select Move on the menu, and select "Move to another subscription".

    enter image description here

    Login or Signup to reply.
  2. how to move Azure resources to either another Azure subscription or another resource group under the same subscription is explained on Azure Knowledgebase. You can use the Azure portal, Azure PowerShell, Azure CLI, or the REST API to move resources.

    You can check out this at
    https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/move-resource-group-and-subscription

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search