Install MS SQL on Ubuntu

0 votes
How do I install MS SQL on Ubuntu? A little help would be nice. Thank you
Feb 28 in Database by Kavita
28 views

1 answer to this question.

0 votes

Hey @Kavita, follow these steps to install MS SQL on ubuntu

Execute these commands:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | sudo tee /etc/apt/sources.list.d/mssql-server.list
sudo apt-get update
sudo apt-get install -y mssql-server

Configure ms-sql

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

Start ms-sql

systemctl status mssql-server
sudo apt-get update

Install ms-sql tools

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get update
sudo apt-get install mssql-tools unixodbc-dev

Press yes and continue

Accept the license by clicking yes

Configure the authentication by clicking on yes

Add PATH environment variable to bash 

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
ls /opt/mssql-tools/bin/sqlcmd*

Create a link

ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd
sudo ufw allow 1433/tcp
sudo service network-manager restart

Login to the server

sqlcmd -S localhost -U SA 
Execute following SQL 
SELECT @@VERSION
2> GO
answered Mar 1 by Kali

Related Questions In Database

0 votes
1 answer

Requirements to install ms-sql on Windows

You'll be requiring the below mentioned: Which version, ...READ MORE

answered Mar 17 in Database by Purva
29 views
0 votes
1 answer

Install MS-SQL Server on Windows

Follow these steps  if you wish to ...READ MORE

answered Mar 18 in Database by Kiran
38 views
0 votes
0 answers

How to install Oracle DB on ubuntu?

Can anyone help me with the step ...READ MORE

Feb 28 in Database by Sukanya Rajput
54 views
0 votes
1 answer

How do i install MongoDB on ubuntu?

Hey @Aryaa, follow these steps: Import Public Key sudo ...READ MORE

answered Mar 15 in Database by Avinash
68 views
0 votes
1 answer
0 votes
1 answer

Access progrs prompt without switching accounts

Use the following to get the postgres prompt ...READ MORE

answered Mar 22 in Database by Mahi
38 views
0 votes
1 answer

Create new role - postgresql on ubuntu

If you are logged in as the postgres account, ...READ MORE

answered Mar 22 in Database by Danny
51 views
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
87 views
0 votes
1 answer

What are the prerequisites to install PostgreSQL on Ubuntu?

Before you start installing postgreSQL, make sure ...READ MORE

answered Mar 22 in Database by Manoj
72 views
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22 in Database by Nitesh
51 views