You may be already aware that installing SQL Server on Linux does not install SQL Server tools by default. You have to install it separately. In the first part of this series, we saw the installation of SQL Server on CentOs. Now, we will install SQL Server Tools on CentOs.
Install SQL Server Tools on CentOs
- Connect SQL Server on Linux as a root user
Syntax: su root
- Download the Microsoft Red Hat repository configuration file.
Syntax: curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo
- Run the following commands to install mssql-tools.
Syntax: sudo yum install mssql-tools
During the installation of the tool, it will prompt you to accept the license terms for MSSQL-Tools.
- Verify the connectivity of SQL Server on Linux machine using command line tool now
Syntax: sqlcmd -H <hostname> -U <username> -P <password>
Now, you are all set to explore SQL Server on CentOs.