OS Manuals

/usr/bin/sqlcmd

Microsoft's modern Go-based command-line utility for Microsoft SQL Server, Azure SQL, and Azure Synapse

From go-sqlcmd 1.10.0-r17 (enterprise-packages), captured 2026-11-08 by running sqlcmd --help (exit 0). permalink

sqlcmd: Install/Create/Query SQL Server, Azure SQL, and Tools

Feedback:
  https://github.com/microsoft/go-sqlcmd/issues/new

Usage:
  sqlcmd [flags]
  sqlcmd [command]

Examples:
# Install/Create, Query, Uninstall SQL Server
  sqlcmd create mssql --accept-eula --using https://aka.ms/AdventureWorksLT.bak
  sqlcmd query "SELECT @@version"
  sqlcmd delete
# View configuration information and connection strings
  sqlcmd config view
  sqlcmd config cs

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  config      Modify sqlconfig files using subcommands like "sqlcmd config use-context mssql"
  create      Install/Create SQL Server, Azure SQL, and Tools
  delete      Uninstall/Delete the current context
  help        Help about any command
  query       Run a query against the current context
  start       Start current context
  stop        Stop current context

Flags:
  -?, --?                  help for backwards compatibility flags (-S, -U, -E etc.)
  -h, --help               help for sqlcmd
      --sqlconfig string   configuration file (default "/tmp/.sqlcmd/sqlconfig")
      --verbosity int      log level, error=0, warn=1, info=2, debug=3, trace=4 (default 2)
      --version            print version of sqlcmd

Use "sqlcmd [command] --help" for more information about a command.
Options (5)
OptionDescriptionSource
-?, --?help for backwards compatibility flags (-S, -U, -E etc.)help
-h, --helphelp for sqlcmdhelp
--sqlconfig stringconfiguration file (default "/tmp/.sqlcmd/sqlconfig")help
--verbosity intlog level, error=0, warn=1, info=2, debug=3, trace=4 (default 2)help
--versionprint version of sqlcmdhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.