Microsoft SQL Server vNext (Preview) on Linux

Running Microsoft SQL Server (preview) on a Linux virtual machine in Azure

Introduction

Yesterday I heart SQL Server vNext on Linux is available for public preview! A good time t install it, and give it a try! In this blogpost, I will show the installation steps and share my first experience with SQL under Linux.

For this installation, I will use an Ubuntu (16.10) VM on Azure (D1 v2 instance). This VM is cheap and VM’s on Azure are very easy and fast to deploy.

Installation Steps

I installed SQL Server on Ubuntu Linux. For the installation I used the following script:

## Add the Microsoft repository to the Ubuntu repository
sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list > /etc/apt/sources.list.d/mssql-server.list
exit

## Install SQL
sudo apt-get update
sudo apt-get install -y mssql-server

## Configure SQL
sudo /opt/mssql/bin/sqlservr-setup

## Check if SQL is running
systemctl status mssql-server

During the configuration of SQL Server, SQL server will ask some questions regarding to the service (setup SA password, service start on boot etc.).

SQL Server Management Studio

After installing SQL Server on Linux, I opened port 1433. Then I used the SQL Server 2016 Management Studio to connect to the just installed server. Offcorse the SQL Server Management Studio would connect! I could do all kind of regular SQL activities: creating databases, query databases, create tables, insert data etc.

I was surprised about the fact that I was also able to query operating system related information:

OS Information:
SELECT * FROM sys.dm_os_sys_info

Performance Counters:
SELECT * FROM sys.dm_os_performance_counters

First Experiance

This version of SQL vNext is a public preview. When connecting with the SQL Management Tools to SQL server you will see some things that are not working yet. For example when you check the properties of the SQL Server, you will notice that the dialog is still saying that SQL server is running under Windows NT X64. There is also no service status available.

The installation of the SQL server under Linux was a very easy job. The installation process was much faster (I got everything working whithin 10 minutes).

Up till now I haven’t done a performancetest. Various pages on the website of Microsoft explain that SQL Server vNext will be much faster than previous versions. For a future blogpost I will create a testscenario and compare the performance of SQL Server 2016, SQL Server vNext on Windows and SQL Server vNext on Linux.

Links related to SQL Server vNext under Linux

Share This