Set up VM SQL Server from Azure

Step 1: Create a VM from the gallary with your choice that include SQL Server version you need;

Step 2: Remote log in to the VM and change Windows permissions to allow  user(s ) to be able to “Perform volume maintenance tasks”;

(secpol.msc >>User Rights Assignment: https://sqlserverperformance.wordpress.com/2009/11/01/two-very-important-configuration-settings-for-sql-server-20052008/  )

Step 3: Add a data disk (Drive O in this sample) from Azure portal to the VM and initialize the disk from the VM;

(https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-classic-attach-disk/)

Step 4: Restore databases from backups either from copied local backup files (may need to move bak file large than 2G) or restore directly from an Azure storage account.

  
 
  
use master
go
 
OPEN Master Key Decryption  BY PASSWORD = 'myifbfpass$2014ForAzure'
Go

Restore DATABASE theDB
FROM URL = 'https://xyz.blob.core.windows.net/aserverInstance/theDB_3bc8ab8d4f8540acbfd7da39fc575b2e_20160323111645-05.bak' 
/* URL includes the endpoint for the BLOB service, followed by the container name, and the name of the backup file*/ 
WITH CREDENTIAL = 'myAzureStorage'
,File=1,NOUNLOAD, REPLACE, STATS = 10
 ,MOVE 'theDB' TO 'O:\MSSQL\theDB.mdf' 
,MOVE 'theDB_log' TO 'O:\MSSQL\theDB_Log.ldf' 
 

 

 

 

 

Advertisements

Comparison Between SQL Server in Windows Azure Virtual Machine and SQL Database

Gregory Leake posted blog at MSDN about comparison between SQL Server in Windows Azure Virtual Machine and SQL Database.
You can read the blog from here:


BACKING UP and Restore AZURE SQL DATABASE

Jason Strate published two blogs about how to backup and restore Azure databases. The links to these two blog entries:

Backup:
http://www.jasonstrate.com/2013/04/backing-up-azure-sql-database-to-the-cloud/

Restore:
http://www.jasonstrate.com/2013/04/restoring-azure-sql-database-to-a-local-server/