The Azure SQL Migration extension for Azure Data Studio provides a seamless and robust migration experience to help you migrate your SQL Server databases to Azure. However, if you have multiple databases across multiple SQL Server instances, migrating them together at scale using graphical UI may not be the most efficient method. Today, we are announcing Public Preview of new migration capabilities added to Az.DataMigration module in Azure PowerShell and az datamigration extension in Azure CLI. With these migration capabilities added to Azure PowerShell and Azure CLI, you can automate tasks and activities related to SQL Server database assessments, performance data collection for Azure recommendations and migration of multiple databases (across multiple SQL Server instances) at scale.
By automating migration activities, you can save time and efficiently migrate a large number of SQL Server databases to Azure SQL Managed Instance or SQL Server on Azure Virtual Machines. For example, the code snippet below demonstrates a SQL Server database migration to Azure SQL Managed Instance using Azure CLI with three commands.
Step 1: Create a new Azure Database Migration service in your Azure subscription.
az datamigration sql-service create --resource-group "myRG" --sql-migration-service-name "myMigrationService" --location "EastUS2"
Step 2: Configure and start online database migration from SQL Server on-premises (with backups in Azure Storage) to Azure SQL Managed Instance.