SQL Server 2017 on Ubuntu Platform

Posted by Saurabh Sharma

Unlike previous releases of SQL Server, this time Microsoft has also given us the choice of picking the operating system on which we wish to install the application. This means SQL Server is now not just limited to Windows but we can also install it on Azure, Linux, Docker, MacOS, and other OS. That said, not all features are available in SQL Server 2017 for non-window platform such as SSRS, and SSAS, but we may see them in upcoming releases.

To help you learn what SQL Server 2017 has in store for Ubuntu platform, we have come up with a two-part series, wherein we will cover its installation, features, expected improvements, and basic functions.

Our discussion in this blogpost will revolve around installation of SQL Server 2017 over Ubuntu 16.04 Operating System, along with what is on offer and what is missing in the application for non-windows platform.

Prerequisites or System Requirement

RAM – at least 4GB

HDD space – at least 6GB

Operating System – Ubuntu 16.04 or higher version


Below is the procedure to install MS SQL Server 2017 on Ubuntu with shell commands.

  • Import the public repository GPG keys

wget -qO- | sudo apt-key add –

  • Register the Microsoft SQL Server Ubuntu repository

sudo add-apt-repository “$(wget -qO-”


  • Run following commands to install SQL Server

sudo apt-get update

sudo apt-get install -y mssql-server


This will end like the following image.

  • After the package installation completes, run mssql-conf setup and follow the prompts to set the SA password and choose your edition

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

From the above screen, choose the edition of SQL Server you want to install.

A PAID edition verifies that you have the appropriate number of licenses in place to install and run the application.

  • We selected Evaluation Edition (first option), which is free with 180-day trial.

  • On this screen, type YES and continue and then choose language from the give options

After selecting the preferred language, there will be a prompt for password. For security purpose, choose a password, at least 8 characters long. We tried a smaller password and system returned an error.

  • After completing the configuration process, verify that the service is running.

  • We now have to install the SQL Server command-line tools. For this, again we will start with importing the public repository GPG keys, followed by registering the Microsoft Ubuntu Repository.

curl | sudo apt-key add –

curl | sudo tee /etc/apt/sources.list.d/msprod.list

  • Now, update the sources list and run the installation command with the unixODBC developer package

sudo apt-get update

sudo apt-get install mssql-tools unixodbc-dev

  • Type Y to proceed

  • Choose ‘Yes’ for the process to continue and on the following page again select ‘Yes’.

  • Verify connection with SQLCMD

sqlcmd -S localhost -U SA -P ‘<YourPassword>’

The server is now connected. We can also check for system databases.

Features Highlights

Now that we have installed and configured SQL Server 2017 on Ubuntu 16.04 Operating System, let us learn about the operations features that are a part of the bundle.

  • It provides command-line tools such as sqlcmd, bcp, sqlpackage, mssql-conf
  • It has SQL agent for job creation and maintenance, along with SQL Server Integration services support
  • It supports Replication, Log Shipping, DMVs, and Full Text Search
  • It has all major language compatibility and supports compression feature
  • It supports In Merory OLTP, ColumnStore as well as Partitioning features

Some of the missing support features in the non-windows SQL Server 2017 that we may see in the new SPs upgrades.

  • Missing Stretch Database support, which is pivotal in cloud environment
  • Polybase DB support
  • DB mirroring and R services

There have also been some improvements in this release.

This completes our information on the hits and misses of SQL Server 2017 for non-windows operating systems.

We have learned to install SQL Server 2017 on Ubuntu 16.04 Operating System, and come to know about the supported features and missed features that we may see in the next release. In the next blog post, we will be focusing on DB creation, table creation, SSIS configuration and other functionalities of SQL Server 2017 on Ubuntu platform.

Until next time!

Related Posts

  • Working with SQL Server Database on Microsoft Azure (Part 2)Working with SQL Server Database on Microsoft Azure (Part 2)

    The huge volume of data generated around us, today, requires optimum storage and management to have any benefit for organizations. With a host of advantages that MS Azure possesses, especially…

  • Microsoft SQL Server Execution PlanMicrosoft SQL Server Execution Plan

    In a database environment, certain questions related to performance pop up repeatedly: why is my query running slowly? And why is SQL Server not using the index? etc.  As a…

  • Different Application of Joins in SQLDifferent Application of Joins in SQL

    Structurally organized with large quantities of information, databases are the backbone of every organization. That is why companies invest in database applications such as MySQL, PostgreSQL, Microsoft SQL Server and…

  • Working with SQL Server Database on Microsoft Azure (Part 3)Working with SQL Server Database on Microsoft Azure (Part 3)

    This is the third and the final part of the series. We started with learning to register MS Azure and create SQL database & objects. Progressed to migrating the on-premise…

  • Amazon Athena: An OverviewAmazon Athena: An Overview

    It is difficult to fathom the progress of the computing world. Only a couple of decades ago, 1.44MB of memory space offered by floppy disks seemed a lot of storage…

  • Working with SQL Server Database on Microsoft Azure (Part 1)Working with SQL Server Database on Microsoft Azure (Part 1)

    One of the trickiest implementations for any organization is the database. They require a dedicated server and someone to manage it. Cloud services such as Microsoft Azure give organizations the…

Leave a Reply

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