
In this Azure tutorial, we will discuss How To Upload SQL Database To Azure. Along with this, we will also discuss a few other topics like How to Import Local SQL Server Database to Azure, Import Data Into Azure SQL Database, Azure Database Migration Service Step-By-Step, How To Create Azure Database Migration Services and we will also discuss Create a New Migration Project, Database Migration Assistant, Download and Install Database Migration Assistant, How To Migrate on-prem database to Azure, How To Restore On-premise SQL Database To Azure.
Table of Contents
- How To Upload SQL Database To Azure
- Import Data Into Azure SQL Database
- Azure Database Migration Service Step-By-Step
- How To Migrate SQL Database To Azure
- How To Create Azure Database Migration Services
- Create a New Migration Project
- Database Migration Assistant
- How To Migrate on prem database to Azure
- How To Restore On-premise SQL Database To Azure
- Wrapping Up
How To Upload SQL Database To Azure
Well, there are multiple ways to move or upload your database to Azure. Let’s discuss the ways to upload the SQL database to Azure.
- Azure SQL Database service tiers
- Azure SQL Database Vs. SQL Server
- What is Microsoft Azure and How does Microsoft Azure Works?
How to Import Local SQL Server Database to Azure
Let’s discuss various options to import the local SQL server database to Azure.
Approach-1: Using Deployment Wizard of SQL Server Management Studio (SSMS)
- Navigate to the Database in your SQL Server Management Studio.
- Right-click on the Database name –> select Tasks option –> Click on Deploy Database to Microsoft Azure SQL Database.

- On the Deploy Database wizard, on the Introduction tab click on the “Next” button, and then on the Deployment Settings tab provide the Server connection, A new name for the Database, Edition of Microsoft Azure SQL Database, the maximum size of the database, etc. and then click on the Next button.
- Review the summary of the Deployment Settings, if all options are ok then click on Finish.
- Now it will validate all the options. if all ok then It will create the BACPAC file and then it will use the Azure SQL for the database creation.
- Now, It will take few minutes and once the process is completed, you will find that the database has been created successfully in the Azure SQL Server.
Approach-2: Using the Generate Scripts option
You can use the Generate Scripts option from the SQL Server Management Studio (SSMS) to export a script from the SQL Server Management Studio and then you need to execute the script to create the schema in your Microsoft Azure SQL DB.
Let’s discuss the complete steps to migrate an existing SQL Server database to Azure SQL Database using the Generate scripts option.
- Navigate to the Database from your SQL Server Management Studio that you want to export.
- Right-click on the Database –> Click on the Tasks option and then select the Generate Scripts option.

- Click on the objects to export tab from the left side, for the select the database objects to script option, you can select the script the entire database and all database objects or select specific database objects based on your need and then click on the Next button.
- Now, on the Set scripting options window, select the option how to save the script like save the script to file, clipboard, new query window, etc.

- You can also set the advanced scripting options.
- You can click on the Advanced button and set the Script for the database engine type property to SQL Database if you don’t want the stand-alone SQL Server instance. Click on the Next button.
- Now, you can also set the Types of data to script option to Schema only, Data only, Schema, and data based on your requirement.
- Finally, click on the Finish button. Now it will generate the script on the local path that you have provided to save the file or the option you have selected to save the script.
- Now You can run this script on your Azure SQL Database.
Approach-3: Using the SQL Server Migration Tool
If you don’t want to use the Deployment Wizard of SQL Server Management Studio (SSMS), then you can also use the SQL Server Migration tool to easily migrate your local SQL server DB to Azure. Download the SQL Server Migration Tool now.
Once, you have downloaded the tool successfully, you can follow the below steps to migrate the local SQL DB to Azure.
- The first step is to launch the migration tool and then click on the Open button.
- Now, choose the Quick Scan option.
- The next step is to select the SQL Server version of the database. You can choose the Auto-detect option if you are not sure about the version of the SQL Server version of the database.
- Now click on the NDF options tab and select the NDF file as you need to add the NDF file. The tool will also help you to choose the NDF file for you automatically.
- Once the NDF file addition has been successfully done, you can able to preview the complete database if you want. Now click on the Migrate button to import the database to Azure.
- The next step is to add the Azure database details including the login credentials and then click on the Connect button. It will take few seconds to connect.
- Now select the Destination Database name from the list of databases.
- The next step is to mark the database components you want to move to Azure SQL Database which is present On the left side of the tool.
- You can select the “With schema” or “With schema & data.” based on your requirement.
- Finally, click on the Migrate button, it will take few minutes and will successfully migrate the local SQL server DB to the Azure SQL server DB.
Import Data Into Azure SQL Database
Well, here we will discuss multiple available options that can be used to import data into the Azure SQL database. Below are a few of the key options.
Method-1: Using the SQL Server Import and Export Wizard
You can use the SQL Server Import and Export Wizard to import or export the data into the Azure SQL database using the below steps.
- Navigate to the SQL Server Management Studio and locate the Database.
- Right-click on the Database and then click on the Tasks option –> Click on the import data option.

- Now choose the Data Source on the SQL Server Import and Export Wizard.
Method-2: Using the Flat File Wizard
You can also use the Flat File Wizard in the SQL Server Management Studio.
- Navigate to the SQL Server Management Studio and locate the Database.
- Right-click on the Database and then click on the Tasks option –> Click on the Import Flat File option.

- On the Import Flat File Wizard, Specify Input File and all other details to import the data into Azure SQL Database.
Azure Database Migration Service Step-By-Step
Let’s discuss here Azure Database Migration Service Step-By-Step.
How To Migrate SQL Database To Azure
Azure Database Migration Service is one of the excellent services from Microsoft that actually helps you to automate your Database migration process to Azure. With the help of the Azure Database Migration Service, you can easily migrate your database schema, database objects to Cloud.
How To Create Azure Database Migration Services
You can easily create the Azure Database Migration Services using the Azure Portal. Follow the below steps to create Azure Database Migration Services on the Azure Portal.
- Log in to the Azure Portal (https://portal.azure.com/).
- Now, search for the Azure Database Migration Services and then click on the search result Azure Database Migration Services as highlighted below.

- On the Azure Database Migration Services window, click on the + Create button to create the Azure Database Migration Service.

Now, on the Create Migration Service window, Provide the below details
- Subscription: Choose a valid subscription that you want to use here.
- Resource group: Select an existing resource group that you want to use here. If you don’t have an existing resource group, you can create a new resource group by clicking on the Create new link as highlighted below.
- Migration Service Name: Provide a unique name for your Azure Migration Service.
- Location: Choose a location.
- Service Mode: You can choose a service mode based on your requirement. Note that the Hybrid option is still on Preview.
- Pricing tier: Choose a pricing tier based on your requirement and usages. You can click on the Configure tier to select a different tier.
Once you have selected all the above details, you can click on the Next + Networking>> button to navigate to the Networking tab.

- On the Networking tab, Provide a unique name for the Virtual Network name and then click on the Review + Create button.

Finally, you can able to see the Create button if all the values provided by you are correct. Now click on the Create button to create the Azure Database Migration Service.
Now, you can able to see the deployment is completed successfully. Click on the Go to resource button to navigate to the Azure Database Migration Service.

Create a New Migration Project
The next step is to create a new migration project as a next step. Follow the below steps to create a new migration project.
- Click on the Go to resource button to navigate to the Azure Database Migration Service that you have created above.
- On the Azure Database Migration Service page, click on the + New Migration Project button to create a new Migration Project.

On the New migration project window, provide the below details
- Project Name: Provide a unique name for your migration project.
- Source Server Type: You need to select the source database server type. The options are SQL Server, MongoDB, MySQL, AWS RDS for MySQL, PostgreSQL, AWS RDS for PostgreSQL, etc.
- Target Server Type: You need to select the target database server type. The options available here are Azure SQL Database, Azure SQL Virtual Machine, Azure SQL Database Managed Instance, etc.
- Migration activity type: You need to select here the Migration activity type that you want to perform. The available options are Data migration, Schema only migration, Create Project only.
To successfully use the Database migration service you can click on each highlighted link as below.
- Create the target Azure SQL Database.
- Use DMA to assess your on-premises SQL Server database(s) for feature parity and compatibility issues.
- Apply fixes and deploy the database schema to your target Azure SQL database using Data Migration Assistant (DMA).

You can also install the Database Migration Assistant using the above link.
Finally, click on the Create and run activity button.
Now you can able to see the Azure Database migration project has been created successfully. Now as a next step we need to create the New Activity.
Create a New activity using Azure Portal
- You can click on the + New Activity button on the Azure Database Migration Project window to create a new activity.

- Once, you clicked on the + New Activity button, now you need to click on the Data migration or Schema only migration based on your requirement.

If you will click on Data migration, you can able to see the below page
On the SQL Server to Azure SQL Database Migration Wizard, Provide the below details
- Source SQL Server instance name: You need to provide your Source SQL Server instance name.
- Authentication Type: Select the authentication type either the Windows Authentication or the SQL Authentication based on your requirements.
- User Name: Provide your User name to connect to the SQL server.
- Password: Same way, provide your Password.
Then click on the Next: SelectDatabases >> button to go to the next tab to select the DB details you want to migrate.

Same way, you need to move to the other tabs to select the Target, Map to target databases and finally Configure Migration Settings to complete the migration process.
Database Migration Assistant
Database Migration Assistant helps you to upgrade your data platform in your target environment by figuring out the compatibility issues also helps to guide the performance and reliability improvements for your target environments. Most importantly, it actually helps you to move easily your Data, schema including the uncontained objects from the source environment to the target environment.
Download and Install Database Migration Assistant
On the New migration project window, click on the Install Database Migration Assistant link as highlighted below to download and install the database migration Assistant.

You can also Download and Install Database Migration Assistant now.
How To Migrate on prem database to Azure
You can easily migrate your on-prem database to Azure using the Database Migration Service. Below are the overall steps you need to perform is as below
- The first thing is, you need to create an instance of the Database Migration Service.
- The second step is to create a migration project in the Database Migration Service.
- Then you need to provide the Source and destination details that as part of the migration.
- Finally, you need to run the migration.
Refer to the above section for more details.
How To Restore On-premise SQL Database To Azure
There are multiple ways to restore on-premise SQL database to Azure. Below are few key ways out of those
- You can Create BACPAC files and export them
- You can also use SQL Server Management Studio (using the import/export wizard, generating scripts) Refer to the above section for the details.
- Another option is to use the Data Migration Assistant Wizard.
You can check out the Steps to Export the On-premise SQL Database to Azure Now.
You may also like following the below articles
- How To Host A Website On Azure
- How to Create Azure Blob storage
- An introduction to Microsoft Azure Portal
- The Type Or Namespace DbContext Could Not Be Found
- How to remove an Azure Virtual Machine (VM)
- The Server Was Not Found Or Was Not Accessible
Wrapping Up
Well, in this article we have discussed How To Upload SQL Database To Azure, How to Import Local SQL Server Database to Azure, Import Data Into Azure SQL Database, Azure Database Migration Service Step-By-Step, How To Create Azure Database Migration Services and we have also discussed Create a New Migration Project, Database Migration Assistant, Download and Install Database Migration Assistant, How To Migrate on-prem database to Azure, How To Restore On-premise SQL Database To Azure.