Migrate from SQL Server: Pre-migration

Applies to: Azure SQL Managed Instance SQL Server on Azure Virtual Machines Azure SQL Database

This article provides steps to prepare your environment to migrate from SQL Server to Azure SQL Database, Azure SQL Managed Instance, and SQL Server on Azure VMs.

Supported sources and targets for migration

You can migrate SQL Server running on-premises or on:

  • SQL Server on virtual machines (VMs).
  • Amazon Web Services (AWS) EC2.
  • Amazon Relational Database Service (AWS RDS).
  • Compute Engine - Google Cloud Platform (GCP).

In this article, you learn how to discover and assess your user databases before migrating them from SQL Server to Azure SQL.

For other migration guides, see Azure Database Migration Guides.

After you verify that your source environment is supported, start with the pre-migration stage. Discover all of the existing data sources, assess migration feasibility, and identify any blocking issues that might prevent your Azure cloud migration.

Prerequisites

To migrate your SQL Server to Azure SQL Managed Instance, make sure you have:

Discover

In the discover phase, scan the network to identify all SQL Server instances and features used by your organization.

Use About Azure Migrate to assess migration suitability of on-premises servers, perform performance-based sizing, and provide cost estimations for running them in Azure.

Alternatively, use the Microsoft Assessment and Planning Toolkit (MAP Toolkit) to assess your current IT infrastructure. The toolkit provides a powerful inventory, assessment, and reporting tool to simplify the migration planning process.

For more information about tools available to use for the discover phase, see Services and tools available for data migration scenarios.

After data sources are discovered, assess any on-premises SQL Server instances that can be migrated to Azure SQL Managed Instance to identify migration blockers or compatibility issues. Proceed to the following steps to assess and migrate databases to Azure SQL Managed Instance:

Screenshot of Steps for migration to Azure SQL Managed Instance.

Assess

Note

If you're assessing the entire SQL Server data estate at scale on VMware, see Create an Azure SQL assessment to get Azure SQL deployment recommendations, target sizing, and monthly estimates.

Determine whether SQL Managed Instance is compatible with the database requirements of your application. SQL Managed Instance is designed to provide easy lift and shift migration for most existing applications that use SQL Server. However, you might sometimes require features or capabilities that aren't yet supported and the cost of implementing a workaround is too high.

The Migrate databases by using the Azure SQL Migration extension for Azure Data Studio provides a seamless wizard based experience to assess, get Azure recommendations and migrate your SQL Server databases on-premises to SQL Server on Azure Virtual Machines. Besides highlighting any migration blockers or warnings, the extension also includes an option for Azure recommendations to collect your databases' performance data to recommend a right-sized Azure SQL Managed Instance to meet the performance needs of your workload (with the least price).

You can use the Azure SQL Migration extension for Azure Data Studio to assess databases to get:

To assess your environment using the Azure SQL Migration extension, follow these steps:

  1. Open the Azure SQL migration extension for Azure Data Studio.
  2. Connect to your source SQL Server instance.
  3. Select Migrate to Azure SQL, in the Azure SQL Migration wizard in Azure Data Studio.
  4. Select databases for assessment, then select Next.
  5. Select your Azure SQL target, in this case, Azure SQL Managed Instance.
  6. Select View/Select to review the assessment report.
  7. Look for migration blocking and feature parity issues. The assessment report can also be exported to a file that can be shared with other teams or personnel in your organization.
  8. Determine the database compatibility level that minimizes post-migration efforts.

To get an Azure recommendation using the Azure SQL Migration extension, follow these steps:

  1. Open the Azure SQL migration extension for Azure Data Studio.
  2. Connect to your source SQL Server instance.
  3. Select Migrate to Azure SQL, in the Azure SQL Migration wizard in Azure Data Studio.
  4. Select databases for assessment, then select Next.
  5. Select your Azure SQL target, in this case, Azure SQL Managed Instance.
  6. Navigate to the Azure recommendations sections, and select Get Azure recommendation.
  7. Select Collect performance data now. Choose a folder on your local computer to store the performance logs, and then select Start.
  8. After 10 minutes, Azure Data Studio indicates that a recommendation is available for Azure SQL Managed Instance.
  9. Check the Azure SQL Managed Instance card, in the Azure SQL target panel to review your Azure SQL Managed Instance SKU recommendation.

To learn more, see Tutorial: Migrate SQL Server to Azure SQL Managed Instance with DMS.

If the assessment encounters multiple blockers to confirm that your database isn't ready for an Azure SQL Managed Instance, then alternatively consider:

Scaled assessments and analysis

The Azure SQL migration extension for Azure Data Studio and Azure Migrate supports performing scaled assessments and consolidation of the assessment reports for analysis.

If you have multiple servers and databases that need to be assessed and analyzed at scale to provide a wider view of the data estate, see the following links to learn more:

Important

Running assessments at scale for multiple databases can also be automated using Run Data Migration Assistant from the command line which also allows the results to be uploaded to Azure Migrate for further analysis and target readiness.