SQL Server 2017 Installation on Ubuntu 16

Once you have the Ubuntu machine ready we can proceed with the below installation steps.

1.      Import the public repository GPG keys:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

  1. Register the Microsoft SQL Server Ubuntu repository:

3.      Run the following commands to install SQL Server:

sudo apt-get update
sudo apt-get install -y mssql-server

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

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


5.      Once the configuration is done, verify that the service is running:

systemctl status mssql-server

  1. If you plan to connect remotely, you might also need to open the SQL Server TCP port (default 1433) on your firewall. At this point, SQL Server is running on your Ubuntu machine and is ready to use!

       You should be good to connect to the new engine through SSMS 17.4

You Can install the command-line tools using the below steps.

7.      Install the SQL Server command-line tools


To create a database, you need to connect with a tool that can run Transact-SQL statements on the SQL Server. The following steps install the SQL Server command-line tools: sqlcmd and bcp.

1.      Import the public repository GPG keys:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

2.      Register the Microsoft Ubuntu repository:

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/prod.list)"

3.      Update the sources list and run the installation command with the unixODBC developer package:

sudo apt-get update
sudo apt-get install -y mssql-tools unixodbc-dev

4.      For convenience, add /opt/mssql-tools/bin/ to your PATH environment variable. This enables you to run the tools without specifying the full path. Run the following commands to modify the PATH for both login sessions and interactive/non-login sessions:
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc

1 comment:
Write comments
  1. How to unravel on the off chance that I am not ready to Connect MS SQL Server from Ubuntu Server? Contact to Online MS SQL Server Support
    In a portion of the cases we have seen that, if any client endeavored to associate on MS SQL Server on Windows machine from Ubuntu server however in the meantime the clients got a blunder message like "Versatile server is inaccessible or does not leave, association planned out" There was an issue interfacing with server. To defeat of this specific issue you need to contact Remote Infrastructure Management Support for Microsoft SQL Server or Microsoft SQL Server Support.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801


Please do not enter spam links

Meet US


More Services