SQL Server command line tools

SQL Server ships with many command prompt utilities. Detailed information about the available tools can be found at https://docs.microsoft.com/en-us/sql/tools/command-prompt-utility-reference-database-engine.

We recommend using the osql and sqlcmd tools. 

Alternatively, PowerShell can be used to access the database, for more information, see https://docs.microsoft.com/en-us/sql/powershell/sql-server-powershell