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:  )

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


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
OPEN Master Key Decryption  BY PASSWORD = 'myifbfpass$2014ForAzure'

Restore DATABASE theDB
FROM URL = '' 
/* URL includes the endpoint for the BLOB service, followed by the container name, and the name of the backup file*/ 
WITH CREDENTIAL = 'myAzureStorage'
 ,MOVE 'theDB' TO 'O:\MSSQL\theDB.mdf' 
,MOVE 'theDB_log' TO 'O:\MSSQL\theDB_Log.ldf' 






Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s