Skip to main content

Migration Of MS SQL From Azure VM To Amazon RDS

who is using Azure Cloud for their application and Microsoft SQL server is hosted on a virtual machine. Soon, they found the need to migrate the application from Azure to AWS due to some amazing features and services of it which would be very helpful to enhance the app & it’s functionalities.

So, in order to do that, my client decided to migrate the Database from VM to Amazon RDS to release the burden of its management along with all the related tasks too. It’s quite difficult to manage a database on a VM. Also, Amazon RDS is a fully managed service & a better platform for running relational databases on Amazon Web Services (AWS).

Migration Of MS SQL From Azure VM To Amazon RDS

In this blog, we will do hands on of migrating Microsoft SQL server from Azure VM to Amazon RDS by using AWS Database Migration Service with minimal downtime.

To know more about AWS DMS you may follow the link below : Database Migration Service in AWS

Prerequisites

1. Azure VM With MS SQL Installed , follow the below link for the same.

https://discourse.ubuntu.com/t/microsoft-sql-server-2019-on-ubuntu-20-04/21943 )

https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu )

This Azure VM With Microsoft SQL Server Installed & In Running State

Install the command line tools to interact with it

2. Site To Site VPN Established Connection Among Both Clouds

https://www.netreo.com/blog/connect-azure-using-vpn-gateway-to-aws-vpc/

3. MS SQL Database ( Target ) within Amazon RDS. Create by following this link https://aws.amazon.com/getting-started/hands-on/create-mysql-db/

Let’s get Our hands dirty here

Create a Replication Instance

Open the AWS Console, search for Database Migration Service and choose Replication Instances from the navigation pane. Then choose to “Create a replication instance”, provide the required details as shown below.

Here provide all the required values in the respective fields as shown below

Select the same VPC in which you have RDS instance for the replication instance as well , in order to keep seamless connectivity throughout the process.

Select the same Availability Zone for Replication Instance as in RDS Instance, Security Group

After you click on the “Create replication instance” button, AWS provisions your replication instance. When your replication instance is ready to run, its status is “Available”, as shown.

Note: Go to the Security Groups section in the Amazon EC2 console & Azure VM. You need to check whether your security group allows your replication instance to access your RDS target database and Source database. Set the rule accordingly.

[Good Read: AWS Direct Connect – A Dedicated Gateway for Migration Solution]

Creating Target and Source Endpoints

Target endpoint

First, create the endpoint for your target database. Navigate to the Endpoints section of the AWS DMS console. Choose “Create endpoint” to create a new endpoint, as shown here.

Select the Target Database created in Amazon RDS.

Enter the following values for the target endpoint, as shown , in the “Username and password” boxes; enter “Username and password” of the target database that you will connect to.

Click on the “Run test” button to test the target endpoint. After a few seconds, you should see a Status of successful. After seeing the status value is “successful”, click on the “Create endpoint” button .

We have successfully created target endpoint now

Source endpoint

Follow these same steps again to create an endpoint for your source database, as shown . 

Note : In Server Name We Have To Mention Private IP Of The Azure VM i.e Source Database

Connection Has Been Established Successfully Between Source Database & Replication Instance

Now we have both target and source database endpoints to move further in the process as shown above

Creating a Migration Task

A migration task is responsible for migrating data from a source database to a target database. In order to start, navigate to the Database migration tasks section of the AWS DMS console. Choose “Create task” to create a new Database migration task, as shown below.

Choose the source endpoint for your database in Azure VM ( for me, source azure) and your target endpoint that we have just created in Amazon RDS ( for me, “database-target”).

In the “Migration type” section; select the “Migrate existing data” to perform a one-time process to copy data from your source database to your target database. Use migration type one-time migrations. 

You can check more info:


Comments

Popular posts from this blog

Step-by-Step Guide to Cloud Migration With DevOps

This successful adoption of cloud technologies is attributed to scalability, security, faster time to market, and team collaboration benefits it offers. With this number increasing rapidly among companies at all levels, organizations are  looking forward to the methods that help them: Eliminate platform complexities Reduce information leakage Minimize cloud operation costs To materialize these elements, organizations are actively turning to DevOps culture that helps them integrate development and operations processes to automate and optimize the complete software development lifecycle. In this blog post, we will discuss the step-by-step approach to cloud migration with DevOps. Steps to Perform Cloud Migration With DevOps Approach Automation, teamwork, and ongoing feedback are all facilitated by the DevOps culture in the cloud migration process. This translates into cloud environments that are continuously optimized to support your business goals and enable faster, more seamless mi...

Empowering Data Engineering Teams with Serverless Architecture

Serverless architecture is becoming increasingly popular in data  engineering due to its scalability, cost efficiency, and ease of maintenance.   Here's an overview of how data engineering teams can effectively leverage   serverless architecture: Serverless computing relieves you of the burden of operating servers so that you can concentrate on what matters—getting value from data. Building Scalable Data Workflows: How Going Serverless Complements Data Engineering With serverless architecture, resource allocation is dynamically managed by the cloud provider , which automatically scales up or down in response to demand. In essence, serverless architecture frees your data engineering team from managing servers so they can concentrate entirely on collecting data from insights. The following are some advantages of using a serverless architecture for intricate data analysis: Scalability: The inherent scalability of serverless architecture is one of its most important benefits...

Cloud Data Warehouses vs. Data Lakes: Choosing the Right Solution for Your Data Strategy

In today’s data-driven world, companies rely on vast amounts of data to fuel business intelligence, predictive analytics, and decision-making processes. As businesses grow, so do their data storage needs. Two popular storage solutions are cloud data warehouses  and data lakes . While they may seem similar, these technologies serve distinct purposes, each with unique advantages and challenges. Here’s a closer look at the key differences, advantages, and considerations to help you decide which one aligns best with your data strategy. What Are Cloud Data Warehouses? Cloud data warehouses are designed for structured data and are optimized for analytics. They allow businesses to perform fast, complex queries on large volumes of data and produce meaningful insights. Popular cloud data warehouses include solutions like Amazon Redshift, Google BigQuery , and Snowflake. These tools enable companies to store, query, and analyze structured data, often in real-time, which can be incredibly use...