SQL Server how to migrate an azure sql database to another subscription within the same tenant

hxzsmxv2  于 2023-06-04  发布在  其他
关注(0)|答案(2)|浏览(327)

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

relj7zay

relj7zay1#

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

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

vybvopom

vybvopom2#

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

相关问题