Archive for the ‘SQL Azure’ Category

Simple Guide to provision SQL Server 2017 on Linux in Azure Virtual Machine

October 12, 2017 Leave a comment

Hi Everyone, In this article, we will see how to provision SQL Server 2017 on Linux in Azure Virtual Machine

Step 1: Please login to azure portal and go to Virtual Machine blade


Step 2: Please search for SQL Server 2017


Step 3: Please select SQL Server 2017 Developer on Ubuntu Server, I have used Ubuntu linux for this demo but you can use Red Hat or Suse Linux as well


Step 4: Please review the legal terms, select deployment model, I prefer to use Resource Manager, so that management and cleanup is easier, Please also copy the highlighted command which will be helpful for configuring the sa password for SQL Server later


Step 5: Please provide the name of the VM, select Disk type, provide user name and select Authentication Type, in this case I am using Password

Please select the Azure Subscription

For Resource group, I am creating a new one named “SQLLinux” and using Azure data center location as “East US”, please change this according to your region


Step 6: In this step, we need to select the Size of our Linux VM, I am using B2S Standard, which has 2 vCPUs and 4 GB RAM, which is good for our testing, but you can choose the size based on your requirement, after selecting the size, Please click “Select” to proceed


Step 7: In this step, we will review some of the important settings

Virtual Network – For this demo, I am creating a new Virtual Network, but if you already have other VMs running in Azure and you need this SQL Server VM to be accessible for them, Please use the existing Virtual Network

Public IP Address – I have enabled Public IP Address for this demo, but this is optional, Please don’t enable this, if you are planning to use this server only within Azure, so that it will reduce the exposure

Network Security Group (Firewall) – We will see in next step, How to configure firewall to allow external access

Auto Shutdown – This is an useful optional setting for demo or test servers, so that you can configure it to shutdown automatically based on a timing, this will reduce billing of your VM

Time Zone – Please select the time zone based on your region


Step 8: Additional Settings Please enable Monitoring for both Boot diagnostics and Guest OS diagnostics, This will help you see the Boot log for any error or messages, after making required Settings changes, Click “Ok” to proceed


Step 9:  To allow external access to SQL Server,  we need to change Network Firewall setting by adding Inbound and Outbound security rules for MSSQL Service

Note: You can do this change after creating the Virtual machine



Step 10: Review the selection options and click “Purchase” to buy and create the virtual machine


Step 11: You can review the Virtual Machine deployment progress in the screen


If you closed it, you can see from the Top right corner Notifications area


You can also see the status under Virtual Machines blade as well


Once Virtual machine is provisioned and ready, you should see the status as “Running”, see below screenshot


Step 12:  Please click on the Virtual Machine to see the settings and also to monitor the CPU/Network/Disk usage


Step 13: Configuring SQL Server in Azure Linux VM

Please connect to Azure Linux VM using any preferred SSH client, In this demo, I am using Bash Shell on Windows, since its built in Windows 10 now

Command to connect, Please type “Yes” to accept the authenticity of the host

ssh username@serveripaddress


Step 14: After logging in to VM, Please run the below command to check the status of SQL Server

sudo systemctl status mssql-server

Since we haven’t configured SA password, SQL Server is not running, so you seeing the status as “Inactive”


Step 15: Please run below command to configure SA password

sudo /opt/mssql/bin/mssql-conf setup

Please select your preferred edition of SQL Server, in this demo, we will use Developer edition, in next prompt, Please specify the SA password and press enter


Once password is setup, SQL Server 2017 will automatically run, Please run the status command again to review the SQL Server status

sudo systemctl status mssql-server


Step 16: Please run “SELECT @@VERSION” using SQLCMD utility to connect to the server to verify we are able to connect and see SQL Server version


Step 17: Now we can use SQL Server Management Studio to connect using the Public IP Address and SA password provisioned


Once connected, Please create your required databases and database objects and use as needed



SQL Server 2017 Developer Edition is up and running Azure Linux VM now in under 5 minutes

I believe you will find this post useful !!!


SQL Azure Import/Export Service has been released to Production

January 24, 2012 Leave a comment

SQL Azure Import/Export Service has been released to Production as of today!!!

SQL Azure Import/Export Service is available at free of charge for SQL Azure customers.

For more information visit the following blog post

Manage SQL Azure server using PowerShell

September 21, 2011 Leave a comment

Windows Azure Platform Powershell Cmdlets has been released and available for download at

It supports creating SQL Azure server, removing an existing SQL Azure server, managing the firewall and resetting the Administrator password.

For more detailed information, please visit

How to create Co-Administrator for SQL Azure Server ?

July 15, 2011 Leave a comment

SQL Azure Co-Administrator option has been released in July 2011 Service Release

In this article, we will see How to add a Co-Administrator for your subscription

After logging in to Windows Azure Management Portal, click on “Database” tab


After navigating to Database section, click on “User Management” in Tool bar


In User Management screen, You can see the currently available Service Administrators and Co-Administrator for all available subscriptions


Click on “Add New Co-Admin”


In Add New Co-Administrator screen, specify the new users’ Windows Live ID and then select the subscription he can administer and then click “Ok”


Now we have successfully created a new Co-Administrator, Now he can login and create or drop servers, create or drop databases and new co-administrators as well


To remove a subscription or remove a Co-Administrator, click on Co-Administrator name and then click on “Manage Co-Admin”


If you have multiple subscriptions, you can remove the subscription which the co-admin should not manage, if you remove all subscriptions, the co-admin account will be removed automatically.

Now let us login using Co-Administrator login and see how the users are displayed


Since the Co-Administrator already has a subscription, he is displayed as Service Administrator for one of the account and Co-Administrator for other account.

Hope you all find this information helpful !!!

SQL Azure Management Portal Changes–Drop SQL Azure Server

July 13, 2011 Leave a comment

Today while working on SQL Azure Management Portal, I found this new change

While Dropping a server, currently its prompting for Server to confirm that we are deleting the right server


If you type the correct server name, then “Drop” button is enabled


The Drop button doesn’t get enabled until you type the server name correctly


This looks like a small change, but this will be great preventive method to avoid any disaster of dropping the server by mistake !!!

Windows Azure Team announces next release for SQL Azure–July 2011 Service Release

July 13, 2011 2 comments

SQL Azure July 2011 Service Release will be released in the upcoming weeks in all datacenters.

The important features in this release will be

1. SQL Azure Engine upgrade to increase overall performance and scalability

2. Co-Administrator Support for SQL Azure

3. Increase capability for using Spatial Data Types

You also need to update SQL Server 2008 R2 Management Studio to SP1, you can download it from the below link

SQL Server 2008 R2 Service Pack 1 – Management Studio x64 – Download

SQL Server 2008 R2 Service Pack 1 – Management Studio x86 – Download

For more information about this release please read the announcement from Windows Azure Team Blog

Categories: SQL Azure Tags:

Compare and Synchronize SQL Azure to/from SQL Server using Optillect Data Compare SQL

July 11, 2011 1 comment

Optillect Data Compare SQL is a new tool which compares and synchronizes data in tables or views for SQL Azure to SQL Server and vice versa.

Key features are

1. Support all version of SQL Server (2000 to Denali and SQL Azure)

2. Support for filtering data

3. Command Line interface available for automation

4. Lightweight, easy to install and use

5. Low price when compared to industry standard competitors. Currently priced as $195, if you upgrade from competitor product, you can buy it for $39

For full list of features visit

Let us see How to use this tool to Synchronize data from SQL Server to SQL Azure

After downloading the tool, double click the setup to run


Click “Next” to proceed


Select “I accept the agreement” and click “Next” to proceed


Click “Next” to proceed


If required, change Shortcut folder or Click “Next” to proceed


Click “Next” to proceed


Click “Install” to confirm and proceed



Once installation is completed, select “Launch Optillect Data Compare SQL” and click “Finish” to complete installation and start the program.

By default a new Data Compare project will be created, with the following options


Based on your Sync direction select Azure or SQL Database for Source and Target.

For SQL Server Database, Specify Server Name, authentication and then select Database

For SQL Azure Database, specify Server Name, select Host, specify username and password credential and then select Database.

Once Source and Target database is defined, click “Next”


In options screen, you can specify How to compare the data such as Object Name Matching, Exclusion Criteria, etc..

Please refer to the following screen for further Comparison options


If you have a bigger database, I highly recommend you to use “Compress data cache” option and also to specify the Data cache directory to a drive where there is plenty of space available according to your database size.

Based on your computer CPU configuration, you can increase the comparison threads as well

After completing the options configuration, click “Next” to proceed


In this screen, by default it maps the schema by its name, if you want to customize it, you can reset the mapping or use Unmap option to unmap it and then select the source and target schema and map it

Once Schema mapping is completed, click “Next” to proceed


In Object Mapping screen, by default you will see all objects mapped automatically by its name, you can unmap them and change the mapping based on your requirement

You can click on the Column Pairs link to customize the mapping at column level, for ex. to exclude a field from data compare


You can filter the data for comparison, using “WHERE clause…” option, you can directly enter the SQL Where clause Criteria and click on “Validate” to verify the criteria works or not


Once Where Clause is defined, click “Ok” to proceed and then click “Compare Now” to start the comparison process


Once the data comparison is completed, the above results will be displayed. You can see the data in the results pane


You can generate the Data comparison report using “Build Report…” option from toolbar, you can generate report in 3 formats, HTML, XML or CSV.

Please see the below sample HTML report


To synchronize the data, click on “Synchronization Wizard…”, to save the script for reference, select “Save synchronization to file” option


Click “Next” to specify the options

You can specify whether to create a backup of the target database before update the data and also specify what transaction isolation level to be used.


After specifying required options, click “Next” to review the action plan


In Action Preview, you can see the steps of data synchronization process, once review click “Synchronize Now!” to proceed



Once Synchronization is complete, you will see the above screen, with time elapsed, you can use “Recompare databases” option to verify if the data comparison worked without any issues.

If you want to automate this synchronization process, you can use “Save BAT file with CMD line” option from File Menu,


Using this option will generate a batch file looking similar to below, using this batch file, you can schedule a windows scheduler task to run the sync on your specific required schedules.



1. Easy to use

2. Lightweight

3. Faster

4. Price is comparable cheaper than industry standard competitors

I hope you all find this information useful !!!

%d bloggers like this: