Recently, my team was required to migrate an SQL Server database to Azure SQL using the Azure database migration service. We analyzed the requirements and performed the complete steps to do this. In this article, you will learn how to migrate your SQL Server database to an Azure SQL database using Azure Database Migration Service.
Azure database migration service step-by-step
Follow the below steps.
- Firstly, open the Azure portal and create a database. If you don’t know how to create a database in Azure SSQL database, you can read our article on How to Create a Single Database in Azure SQL.
- Then, you have to create the same database schema as it is in your local on-premise SQL Server database.
- To create this database schema, connect to your SQL Server database with SQL Server management studio.
- In the object explorer window, right-click on your database, click on Tasks, and then click on Generate Scripts as shown in the screenshot below.

- This wizard will create a script for creating your database schema. You can run this script on the Azure SQL database and create the same database schema.
- You can also create this script using the Data Migration Assistant tool.
- Once you have created the database with the same schema in Azure SQL database, you are ready to use the Azure Database Migration Service.
- In the Azure portal, search and open Azure Database Migration Services.
- Click on Create to create a new migration service, as shown in the screenshot below.

- Specify the instance details, i.e., the subscription to use, resource group under which you will create the new service, migration service name, location of the service, and service mode.
- Click on Configure tier to select the service tier and the number of vCores you want to assign to the service. Select Standard for offline migration. The Standard tier is free to use, but you have to face some downtime. Click on Next.

- Select an existing virtual network in the Networking tab or create a new one. The service needs This virtual network to connect to the source and target databases. Click on Review + create.

- Review the settings that you have specified for the migration service, and then click on Create.
- Once you have created the database migration service, you must create a project using this service.
- In your database migration service Overview, click on New Migration Project.
- Now, enter the details of the new projects:
- Project name: The project name
- Source server type: SQL Server
- Target server type: Azure SQL Database
- Migration activity type: Data Migration

- After entering these details, click on Create and run activity.
- Enter the source details, authentication method, and credentials in the Select Source tab. Click on Next.
- Then, you must select the database you want to migrate in the Select Databases tab. You can see the expected downtime for the migration process for all your databases. Select the database to migrate and click on Next.
- After that, you have to select the target database. You have to specify the details of the target database. Click on Next.
- Then, in the Map to Target Databases tab, you must select the Azure SQL database into which you want your database to migrate. Click on Next.
- You can select which database objects you want to migrate in the Configure migration settings tab. Select the objects to migrate and click on Next.
- In the Summary tab, you can review the settings that you have defined for the migration process. Click on Start Migration to start the process.
- After some time, the process will be completed, and you can verify the data in the new database.
Conclusion
This way, you can use the Microsoft Azure Database Migration Service to migrate your on-premise SQL Server database to the Azure SQL database as mentioned in this article.
You may also like following the articles below.
- Migrate SQL Server to Azure SQL database.
- Azure SQL Database Schema – Complete tutorial
- Azure SQL database query history
I am Bijay having more than 15 years of experience in the Software Industry. During this time, I have worked on MariaDB and used it in a lot of projects. Most of our readers are from the United States, Canada, United Kingdom, Australia, New Zealand, etc.
Want to learn MariaDB? Check out all the articles and tutorials that I wrote on MariaDB. Also, I am a Microsoft MVP.