logo
Menu
DMS Cooks It Up: Azure SQL DB to RDS SQL Server Migration

DMS Cooks It Up: Azure SQL DB to RDS SQL Server Migration

Migrating Azure SQL Database to Amazon RDS for SQL Server using AWS DMS

Published Jun 5, 2024

Deliciousness Guaranteed πŸ˜‹

According to research and customer testimonials, Microsoft SQL Server has a lot of benefits in AWS in terms of price, performance, and high availability. Suspicious? This is definitely not a cap. Here are some facts to check out:
  • https://aws.amazon.com/blogs/compute/sql-server-runs-better-on-aws/
  • https://aws.amazon.com/blogs/compute/we-love-sql-server-running-on-aws-almost-as-much-as-our-customers/
  • https://aws.amazon.com/blogs/compute/learn-why-aws-is-the-best-cloud-to-run-microsoft-windows-server-and-sql-server-workloads/
If you're already convinced, the best time to migrate was yesterday! With AWS, migrating is easy and worry-free. In this article, I'll show you how simple it is to migrate your Azure SQL Database to Amazon RDS for SQL Server using AWS DMS. Let's get cooking!

Main Ingredients πŸ›’

AWS Database Migration Service (DMS)

AWS DMS is a helpful tool for moving your databases (relational databases, data warehouses, and even NoSQL databases) to the cloud. Whether you want to migrate your data entirely to the AWS Cloud or move it between cloud and on-premises locations, AWS DMS can assist you. This service can discover your source data stores, convert your source schemas, and migrate your data.
You can read more here: https://docs.aws.amazon.com/dms/latest/userguide/Welcome.html

Amazon Relational Database (RDS)

Amazon RDS simplifies cloud database management for a variety of engine choices, including popular open-source options like MySQL, MariaDB, PostgreSQL, and Aurora (MySQL-compatible and PostgreSQL-compatible editions), as well as commercial choices like SQL Server, Oracle, and Db2. It offers easy setup, operation, and scaling for these engines, along with cost-effective, adjustable storage, and handles routine database admin tasks for you.
You can read more here: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html

Azure SQL Database

Azure SQL Database is always running on the latest stable version of the SQL Server database engine and patched OS withΒ 99.99% availability. PaaS capabilities built into Azure SQL Database enable you to focus on the domain-specific database administration and optimization activities that are critical for your business.
You can read more here: https://learn.microsoft.com/en-us/azure/azure-sql/azure-sql-iaas-vs-paas-what-is-overview?view=azuresql

Prep Work πŸ“

  1. Complete setup of Azure Network Environment (Virtual Network)
  2. Complete setup of AWS Network Environment (Virtual Private Cloud)
  3. Site-to-Site connection setup to connect the Azure environment and AWS environment. Refer to this documentation: https://techcommunity.microsoft.com/t5/fasttrack-for-azure/how-to-create-a-vpn-between-azure-and-aws-using-only-managed/ba-p/2281900

Cooking Time! πŸ§‘πŸ½β€πŸ³

Azure Environment

  1. Setup Azure SQL Database.
  1. Make sure that your database has data. In here, I've chosen the sample database (AdventureWorks) provided by Azure SQL Database upon the creation of the instance.
  1. We want the database to be privately accessed (via VPN) so we need to disable the public network access.
  1. Create a private endpoint to ensure private access. Make sure to copy its Private IP address because we will use it later.

AWS Environment

  1. Create a private Amazon RDS for SQL Server.
  1. Create a private replication instance in AWS DMS.
  1. Create an Amazon Route 53 Hosted Zone and create an A record for the Azure private endpoint that we created earlier so that AWS can reach the Azure SQL Database. This is the time that you will use the Private IP that you copied earlier.
  1. Create the source and target endpoints and ensure that they have successful connections.
  1. Create a AWS DMS Migration Task (Full Load only since as of this writing, Azure SQL Database doesn’t support Ongoing Replication)
  1. Check your Amazon RDS for SQL Server if the data migrated successfully.

Kitchen Mishaps ⚠️

Errors are inevitable, but they can be valuable learning experiences. Here are a few things I've learned from my own troubleshooting:
  1. Have a successful Site-to-Site VPN connection. To verify the connection between your cloud environments, create temporary virtual machines in each environment. Ensure your firewall rules allow ICMP (ping) traffic on both sides to facilitate testing. Once the VMs are running, use the "ping" command from one VM to the IP address of the other VM to test connectivity.
  2. To ensure secure communication and successful connection within and between cloud environments, implement necessary inbound and outbound firewall rules for all database instances, replication instances, and other workloads. Specifically, allow inbound traffic on ports commonly used by database services like 1433 for Microsoft SQL Server. These rules should be configured following the principle of least privilege, granting access only to authorized sources and services.
  3. To securely connect your AWS resources to your Azure SQL Database, leverage an Amazon Route 53 Private Hosted Zone. This acts as a private DNS service within your AWS Virtual Private Cloud (VPC). You can create a DNS record that points to your Azure SQL Database private endpoint without exposing its IP to the public internet.

Need professional help on your business? πŸ‘‹πŸ½

I'm an AWS Cloud Engineer at Computrade Technology Philippines, Inc., an AWS Partner. We specialize in all aspects of AWS Cloud, particularly databases. Whether you're migrating workloads, optimizing costs, enhancing security, or building chatbots, our expert AWS Cloud Engineers are here to help.
Reach us out via:
  • Email: ctp_sales@computradetech.com.ph
  • Website: computradetech.com.ph
    Β 

Comments