BlueXP Blog

Migrate SQL Server to Azure: Options, Tools, and a Quick Tutorial

Written by Yifat Perry, Technical Content Manager | Aug 10, 2021 2:21:45 PM

What Is SQL Server Migration to Azure?

Microsoft SQL Server is a relational database management system (RDBMS) commonly used for tasks like transaction processing, business intelligence (BI), and analytics.

Azure offers three main options to implement SQL Server in Azure, including:

  • IaaS on Azure—install and run the database on Azure virtual machines (VMs).
  • PaaS on Azure—migrate your on-prem database to Azure SQL Database.
  • IaaS and PaaS—use Azure SQL Database managed instances to gain both IaaS and PaaS features.

Azure offers free, automated tools that can help you perform Azure migration for on-premises SQL Server databases, using any of the above deployment models.

In this article, you will learn:

SQL Server Migration to Azure: Options and Tools

SQL Server Migration Options

Azure SQL Database

This is a fully managed platform as a service (PaaS) designed to handle SQL Server workloads. It offers many database management features, including built-in high availability, performance, scalability, and intelligent query processing capabilities.

Azure SQL Database supports a wide range of use cases, offering multiple service tiers and deployment models. It also offers features that can help you modernize applications—for example, eliminating dependency on components like SQL Agent jobs that run at the instance level.

An advantage of this service is that it lets you bring your own SQL Server license (BYOL), using the Hybrid Benefit program.

Azure SQL Managed Instance

Azure SQL Managed Instance lets you migrate applications from an on-premises data center to Azure with minimal changes to database or application code. The service runs SQL Server in a dedicated VM on Azure, giving you more control over configuration, but manages the VM and operating system for you. It completely isolates your instances using native support for Azure Virtual Networks (VNets).

Azure Virtual Machines

You can run SQL Server directly in a self-managed Azure VM. This deployment option gives you the same level of control and customization of database host and configuration as you would have in your local data center.

Azure VMs are available in a wide range of sizes and different geographic regions across the globe. Azure offers a VM image gallery that lets you create SQL Server VMs with the operating system and version edition that suits your needs.

Here are several key advantages of migrating on-premises workloads to SQL Server on Azure VMs:

  • Using an SQL Server environment while still maintaining control over the operating system.
  • Gaining access to cloud-based features like built-in VM high availability and automated backups.
  • Deploying full versions of cloud-based SQL Server without the need to manage on-premises hardware.
  • Taking advantage of simplified licensing costs, which are included in the price of the Azure VM.

Learn more in our guide Azure SQL Server: Managed Service vs Self Managed

SQL Server Migration Tools

Here are several tools that can help you migrate SQL Server to Azure.

Azure Migrate
This service is designed to help you identify and assess SQL data on VMware. Azure Migrate offers recommendations for Azure SQL deployments, as well as monthly cost estimates and recommendations for target sizing.

Data Migration Assistant
This desktop tool can help you achieve single-database SQL Server migrations to Azure SQL Database. You can use it to migrate both data and schema.

You can install Data Migration Assistant on an on-prem server or on a local machine with connectivity to the source databases. The tool logically moves data between objects located in your target and source databases.

Azure Database Migration Service (DMS)
This service automatically migrates on-premises SQL Server instances to the managed Azure SQL Database service. You can use it to automatically migrate using PowerShell, or manually migrate via the Azure portal.

When using Database Migration Service, you must choose a preferred Azure virtual network for provisioning. This is critical to ensure connectivity to source SQL Server databases.

Tutorial: SQL Server Migration to the Azure SQL Database

This tutorial shows how to move your SQL Server database to the Azure SQL Server, Azure’s fully managed database-as-a-service offering.

Pre-Migration

Check that the database supports your source environment and begin the pre-migration stage, in which you assess migration feasibility, discover resources, identify and remediate potential obstacles to migration.

Discovery
Scan your network for all SQL Server instances and other relevant features. You can use Azure Migrate to assess the migration suitability of each on-premises server and estimate their running costs in Azure.

Assessment
Assess the compatibility of your on-premises SQL Server databases with Azure SQL Database. Data Migration Assistant (from version 4.1) can provide recommendations for Azure target and the SKU (VM size) that can support your workloads.

To conduct the assessment:

    1. Open the Data Migration Assistant (DMA)
    2. Select File
    3. Select New assessment
    4. Specify your project name, under Source, choose SQL Server, and under Target, choose Azure SQL Database.

Image Source: Azure

  1. Select the assessment report categories you want to use—use feature parity for comprehensive recommendations and compatibility issues to identify issues with unsupported or partially supported features, and get recommendations for dealing with them.
  2. Specify your source database connection details to connect to it.
  3. Select Start assessment to identify issues hindering migration or affecting feature parity.
  4. Review the reports generated by the assessment—you can export it to a shareable file and determine which compatibility issues you intend to remediate.
  5. Identify which Azure SQL Database SKU best suits your on-premises workloads.

Migration

Once you complete the pre-migration stage, you can start migrating your data using your preferred migration strategy with Data Migration Assistant.

Use the following steps:

  1. Download DMA and install it.
  2. Open a new project and under Type, select Migration.
  3. Select source and target as SQL Server and Azure SQL Database, respectively. Select Schema and data as the scope of migration and choose Create.
  4. Specify the details of the source server (e.g., server name, credentials) in your migration project.
  5. Specify the details of the target server (e.g., the source server name, target database and credentials).
  6. Select and deploy schema objects to the target database.
  7. Select Start data migration and proceed to monitor migration progress.

Post-Migration

Following a successful migration stage, you can perform post-migration tasks to help ensure things are functioning properly.

Remediation of applications
Once you’ve migrated data to your target environment, make sure the applications previously connected to your source database can now connect to and use the target. In some cases, this may require changes to your applications.

Testing
Perform tests to validate your source and target database and to assess performance. You can do this by constructing a set of validation queries. Set up a testing environment (an isolated duplicate of the databases to be tested), run validation and performance tests, and analyze the results.

Migrate SQL Server to Azure with Cloud Volumes ONTAP

NetApp Cloud Volumes ONTAP, the leading enterprise-grade storage management solution, delivers secure, proven storage management services on AWS, Azure and Google Cloud. Cloud Volumes ONTAP capacity can scale into the petabytes, and it supports various use cases such as file services, databases, DevOps or any other enterprise workload, with a strong set of features including high availability, data protection, storage efficiencies, Kubernetes integration, and more.

In particular, Cloud Volumes ONTAP helps in addressing database workloads challenges in the cloud, and filling the gap between your cloud-based database capabilities and the public cloud resources it runs on.

Cloud Volumes ONTAP also assists with lift and shift cloud migration. NetApp’s data replication tools SnapMirror® and Cloud Sync service will get your data to the cloud.

Learn more in these Cloud Volumes ONTAP Databases Case Studies and these Cloud Migration Case Studies.