Bobcares

How to install SQL Tools on RedHat Linux

by | Oct 18, 2020

Trying to install SQL tools on Redhat? We can help you with it.

Here at Bobcares, we have seen several such SQL related queries as part of our Server Management Services for web hosts and online service providers.

Today we’ll take a look at how to install SQL tools on Redhat.

 

Know more about SQL tools

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

Moreover, it boosts 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

Here are the steps our Support Engineers follow to install the SQL tools.

First, we check the SQL server to make sure that it is installed on the machine. For that, we run the below command.

$ systemctl status mssql-server

As a result, it must display that the SQL server is running on the machine.

Now, it’s time to check if the SQL tools are installed on the machine or not. For that, we run the below command.

$ sqlcmd

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

So now we will download the Microsoft SQL Tools Redhat repository configuration file by running the below command.

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

Now, a file downloads, 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 below command

$ sudo yum update

Once the package updates then run the below 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 below command to confirm the installation.

$ sqlcmd

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 below 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 any assistance with SQL queries? – We’ll help you]

 

Conclusion

Today, we saw how our Support Engineers install SQL tools on Redhat.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.