info@techdevops.com | 437-991-3573 | Data Engineering Services
TechDevOps.com
Resources Tools
Experts in Microsoft SQL Server on Windows, Linux, Containers | Clusters, Always On, FCI | Migrations, Cloud, Performance



Move Azure SQL Server and Azure SQL Database to a new Resource Group
by BF (Principal Consultant; Architecture; Engineering)
2015-12-14







To move an Azure SQL Database(as-a-service) to another Resource Group you must move
the top level resource first, which in this case is the SQL Server that the DB resides on.
Move the Azure SQL Server and the Azure SQL Database moves with it.



Solution:


Powershell:

$resource = Get-AzureRmResource -ResourceName srv-az-db-3 -ResourceGroupName rgAZDB1
Move-AzureRmResource -DestinationResourceGroupName TestResourceGroup -ResourceId $resource.ResourceId




Image #1: Powershell Confirm






Image #2: Azure Portal - Moving Resources