Professional Documents
Culture Documents
Sign in
Docs Blog Archive Don Castelino
We're no longer updating this content regularly. Check the Microsoft Product
Lifecycle for information about how this product, service, technology, or API is
supported.
Search
Filter by title
Migrate SQL database from On-Prem to Azure using SQL Database Migration Wizard tool
Migrating database from AlwaysOn AG to another with JoinOnly option
Migrate SQL database from On-Prem to Azure using SQL Database Migration Wizard tool
Article
12/23/2016
3 minutes to read
Hello all,
In this blog, I am covering the scenario of migrating the SQL Server database from
On premise environment to SQL Azure Virtual machine.
There are multiple ways to migrate the application database hosted in On premise to
Azure Virtual machine. Few to mention are:
To build, manage, monitor the Virtual machine on Microsoft Azure cloud, using the
unified console “Microsoft Azure Portal”
3
Next step is to create a new Virtual machine with Microsoft SQL Server 2016:
Creating a SQL Server Azure Virtual machine involves the below steps:
To connect to the Virtual machine, we need to use the DNS name mapped with the
Virtual machine host name. To connect to the SQL Server instance hosted on Windows
Azure, make sure that the port on which SQL Server is listening on is opened on
Windows Firewall.
Connecting to SQL Server instance using Microsoft SQL Server management Studio tool
(SSMS):.
To migrate the application database from On-premise to Azure VM, I am using SQL
Database Migration Wizard tool. The tool can be downloaded from:
https://sqlazuremw.codeplex.com/
Once the SQL Migration Wizard tool is installed, migrate the database to SQL Server
hosted in Windows Azure Virtual machine:
8
Source database is the database hosted in On-premise environment. For
demonstration, I am using the database: AdventureWorks2014.
The tool gives an option to specify the objects which are to be migrated.
10
The tool, collects the script of all the objects in the database and prepare a Bulk
Copy command to be executed on Target SQL instance.
11
The next step is to specify the Target SQL Server database which is hosted on Azure
Virtual machine.
12
The tool executes the script generated on the source server and executes on the
destination Azure Virtual machine SQL instance.
13
Now to test the SQL query execution on the database hosted on Azure VM, in the
connection string of the application, pass the DNS name of the Azure Virtual
machine which is hosting the SQL Server instance.
As per the below screenshot, the connectivity to the SQL database hosted on Azure
VM is successful and the query execution completed in 0.52 seconds.
5
Please share your feedback, questions and/or suggestions.
Thanks,
Disclaimer: All posts are provided AS IS with no warranties and confer no rights.
Additionally, views expressed here are my own and not those of my employer,
Microsoft.