Command-line query tools for SQL in Linux
There are two primary command-line query tools that are available for SQL Server on Linux, one that is old and one that is brand new:
- sqlcmd
- mssql-cli
SQLCMD
For the SQL DBA, SQLCMD is a familiar command-line tool that is also available in Linux. This is part of the mssql-tools installation that will be available for most, if not all, SQL Servers on Linux, and can be used to run scripts, query databases, and system procedures.
Installation differs depending the Linux distribution, but for our example, the Ubuntu installation will be used to show how an installation would be performed to update the package to your Ubuntu update for the latest mssql-tools package and then installation:
sudo apt-get update sudo apt-get install mssql-tools
Updates are regularly available for the SQLCMD utility. The newest additions are available for the following Linux distributions, and now include Azure Active Directory multi-factor...