Steps to install SQL Tools on RedHat Linux

Are you having issues installing SQL tools on Redhat? This guide will help do it.

SQL Tools is a development tool pack that provides many essential features for any Microsoft SQL Server developer.

Here at Ibmi Media, as part of our Server Administration Services, we regularly help our Customers to perform SQL related activities.

In this context, we shall look into how to install SQL tools on Redhat.

A brief information about SQL tools.

SQL tools helps to improve productivity, reduce expenses while performing routine tasks, and automate database development.
After installing SQL Server on Red Hat Linux server, you would need to install the SQL tools to make the database connection locally on the server.

How to install SQL tools on Redhat?

To install SQL tools, follow the steps provided below;

Start by checking the SQL server to make sure that it is installed on the machine. To do this, execute the following command;

systemctl status mssql-server

This will display that the SQL server is running on the machine.

Now, check if the SQL tools are installed on the machine or not. To do this, execute the following command;


If the above command shows a result of "No such file or directory" then it means that the SQL tools are not yet installed.

Next,  download the Microsoft SQL Tools Redhat repository configuration file by running the following command;

sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo

This will download the file, and also you can see the path where it is being downloaded.

To install the SQL tools along with the unixODBC package on this server, first, update all packages by running the following command;

sudo yum update

Once the package updates then run the following command to install SQL Tools;

sudo yum install -y mssql-tools unixODBC-devel

Once the execution completes, you will be asked to accept the license. Type YES and Enter. Within a few minutes the installation completes.

Then you can go ahead and run the following command to confirm the installation;


In case, if your Linux server is not able to recognize SQL Server Tools utility sqlcmd or BCP we need to set path environment variables. So you can run the given commands to add "/opt/mssql-tools/bin/" to your PATH environment variable(this is an optional step);

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

Now, the sqlcmd utility command must recognize the SQL tools. This confirms that the installation was successful.

[Need further support with SQL queries? – We are available to help you today.]


This article will guide you on how to install SQL tools on Redhat.