Tags

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,


SQL Server 2017 on LINUX | Install sqlcmd and bcp the SQL Server command-line tools on Ubuntu

In this article we shall discuss about the installation of sqlcmd and bcp on Ubuntu 16.04.

The following steps install the command-line tools, Microsoft ODBC drivers, and their dependencies. The mssql-tools package contains following tools.

1. sqlcmd: Command-line query utility.
2. bcp: Bulk import-export utility.

Install tools on Ubuntu 16.04
We need to use the following steps to install the mssql-tools on Ubuntu.

Steps-

1. Import the public repository GPG keys.

	--

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

	--
	

2. Register the Microsoft Ubuntu repository.

	--

	curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list

	--
	

3. 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

	--
	

4. Optional: Add /opt/mssql-tools/bin/ to your PATH environment variable in a bash shell.
To make sqlcmd/bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file with the following command:

	--

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

	--
	

References-

1 https://docs.microsoft.com/en-us/sql/sql-operations-studio/download
2 https://go.microsoft.com/fwlink/?linkid=875602
3 https://msbiskills.com/2018/01/19/2017-new-data-management-tool-for-sql-server-sql-operations-studio/
4 https://docs.microsoft.com/en-us/sql/sql-operations-studio/download?view=sql-server-2017
5 https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-linux-2017
6 https://msbiskills.com/2018/07/17/sql-server-2017-on-linux-installing-sql-server-on-ubuntu/

Other SQL SERVER on Linux related articles

1 https://msbiskills.com/2018/07/11/sql-server-2017-on-linux-faqs-microsoft/
2 https://msbiskills.com/2018/07/17/sql-server-2017-on-linux-how-to-install-sql-operations-studiosos-on-linuxubuntu/

Enjoy.

Thank you for reading.!!!

Pawan Khowal

Pawan is a SQL Server Developer. If you need any help in writing code/puzzle or training please email at – pawankkmr”AT”gmail.com. Meanwhile please go throgh the top pages from his blog.

Page Detail URL
☛ SQL Advance Puzzles https://msbiskills.com/tsql-puzzles-asked-in-interview-over-the-years/
☛ SQL Tricky Queries https://msbiskills.com/sql-puzzles-finding-outputs/
☛ SQL Server Performance tuning Articles https://msbiskills.com/sql-performance-tuning/
☛ SQL Server Articles https://msbiskills.com/t-sql/
☛ SQL Interview Questions & Answers https://msbiskills.com/sql-server-interview-questions/

My SQL Groups on Facebook:

1. If you like this post, you may want to join my SQL SERVER Interview Puzzles/Interview Questions on Facebook: https://www.facebook.com/groups/1430882120556342/

2. If you like this post, you may want to join my SQL Server Puzzles on Facebook:
https://www.facebook.com/groups/206594023090781/

My SQL Page on Facebook:

2. For all the updates you may follow my page -> https://www.facebook.com/MSBISkillscom-1602779883299222/

Enjoy !!! Keep Learning

Http://MsbiSkills.com