Migrate an On-Premises SQL Server 2012 Database to Windows Azure SQL VM – Part 4

Deploy Database to a Microsoft Azure VM

Create a Azure SQL Virtual Machine by logging on to https://manage.windowsazure.com

VM_1

Click on [CREATE A VIRTUAL MACHINE]

Vm_2

Select the SQL Image

Vm_3

Select SQL Server from the Image list and choose the right SQL Server version you would like to deploy. I choose SQL Server 2012 Ent.Edition

Vm_4

Vm_5

Configure the VM, choose the correct size in regards to CPU and Memory

Vm_6

Select Location and Storage

Vm_8

Add Endpoints

Vm_9

Configure the Right extension for deployment and Security

VM_10

Click OK to create the VM

VM_11

Once the VM is created click on the VM

VM_12

VM_13

Click on the DASHBOARD .Select and copy the VM DNS

VM_14

Download the Connect >< and download the RDP file to connect the Virtual Machine remotely.Once you logged into the server you need to make couple of changes mentioned below.

  1. Start the SQL Browser Services
  2. Configure inbound and outbound firewall rules
  3. Configure the SQL Server Instance to use Windows and SQL Authentication
  4. Restart SQL Server Services
  5. Create a SQL Server Account

Connect to Azure Virtual Machine SQL Instance from On-Premises SSMS

VM_16

VM_17

Connect to On-Premises SQL Instance andbackup the database to URL on Azure Storage

BACKUP DATABASE [AdventureWorks2014] TO  
URL = N'https://dbprox.blob.core.windows.net/dbproxstoragecontainer/AdventureWorks2014_backup_2015_11_10_175152.bak' 
WITH  CREDENTIAL = N'AzureCredential' , 
NOFORMAT, NOINIT,  NAME = N'AdventureWorks2014-Full Database Backup', 
NOSKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

VM_URL_Backup

VM_URL_Backup_1

Login to Azure SQL VM

vm_SQL1

Connect to Azure SQL VM Instance.Right Click the Database folder and select Restore Database

Select option Device and choose Backup media type to URL.Click Add (Configure Storage account)

vm_SQL2

vm_SQL3

Click connect.After successful connection , SQL Server will open the Azure Containers

vm_SQL4

vm_SQL5

vm_SQL6

Click OK. SQL Server will read the backup device header from Azure Cloud Storage

vm_SQL8

Move the files and restore the database

RestoreURL2

 

Deploy Database to a Microsoft Azure VM using SSMS

Open SSMS On-Premises and Connect to the On-Premises SQL Instance.Right click the database , click tasks and choose Deploy Database to a Microsoft Azure VM

VM_18

 

VM_19

Connect to the Source SQL Instance and Select  the database to move to Azure SQL VM

VM_20

Choose the local location for backup files

VM_21

Sign-in to Azure Account

VM_22

VM_23

VM_24

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *