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, 2019 in Database by Kavita
445 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

If you need to know more about MS SQL, it is recommended to go for the SQL Certification Course today.

answered Mar 1, 2019 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, 2019 in Database by Purva
360 views
0 votes
1 answer

Install MS-SQL Server on Windows

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

answered Mar 18, 2019 in Database by Kiran
585 views
0 votes
0 answers

How to install Oracle DB on ubuntu?

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

Feb 28, 2019 in Database by Sukanya Rajput
588 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, 2019 in Database by Avinash
591 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, 2019 in Database by Mahi
654 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, 2019 in Database by Danny
555 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
960 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, 2019 in Database by Manoj
632 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
932 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP