How to Migrating SQL Server database to SQL Azure

Words
391
Reading
2 min
Listen
Play
9y

What Will I Learn?

  • You will learn how to move or migrate SQL Server database to Azure SQL database.
  • DACPAC Deployment
  • BACPAC Deployment

Requirements

  • Computer system
  • Microsoft Azure free account
  • Microsoft SQL Server Management Studio 2014 Express Version

Get Microsoft Azure free account here

Get Microsoft SQL Server Management Studio Express Version here

Difficulty

  • Intermediate

Tutorial Contents

  • Migrate existing SQL Server database to SQL Azure
  • DACPAC Deployment
  • BACPAC Deployment

DACPAC Deployment

We first need to connect to the database.I am connecting to my local SQL Express instance.
5.png

Expand databases.Find our database called AzureDac and navigate the table.This database contains a few records.

azuredav.png

We will need to do first azure sign up .Then we need to create a new SQL azure database the our destination for the migration.

1.png

We are creating a database which name is test and include to resource group.The server need to configure settings like server name admin login and password.
2.png

We need to enter our azure connection information and click connect .
cobb_string.jpg

We now have a new SQL Azure database that we'll use as our destination

4.png

baglantı.jpg

First option generate scrpits task.Click next here.We can choose the database objects we want to generate in our case .Choose the entire database and all objects selected.Click next.

1.yol.jpg

Clicking on advanced specify that target SQL Azure engine.Find the script for the database engine type option and select SQL Azure database.And type of script is set to data and schema only.We want to save script file and next.And close the wizard.
generate script ilk yol.png

script for the database engine type_Azure seçtik.png

finish.png

We can deploy the script our destination SQL Azure database. Click our SQK Azure database in SQL Server Management studio and select new query and open our script file and execeute the script our SQL Azure databaseWe have the table and objects.

zxxx.png

BACPAC Deployment

This is the another way for the migration.In our local SQL server find our database and go to from Tasks to the Deploy Database to Microsoft Azure SQL Database option.

deploy database to azure sql DB.jpg

The wizards appears than click Next.

deploy database AzureDac.jpg

After than from Deployment Settings we are connecting to the Azure database and click Next.
size olarak 2 gb veriyor.png

işlem tamamlanıyor.png

Finally when we check our query editor in Azure SQL database we will see our changes.

dbo_check.png

Summary

As you can see above how to migrating SQL Server database to SQL Azure with two ways.



Posted on Utopian.io - Rewarding Open Source Contributors

How to Migrating SQL Server database to SQL Azure | Ecency