sqlcmd is a cross-platform command-line database utility developed by Microsoft for interacting with SQL Server and Azure SQL environments. Written in Go, it uses the go-mssqldb driver rather than the traditional ODBC implementation. Users can execute Transact-SQL queries interactively, process SQL script files, or accept piped input for automation. Integrated commands create and manage local SQL Server instances through compatible container runtimes. Persistent connection contexts simplify switching between database servers and authentication configurations. Microsoft Entra ID integration supports interactive authentication, managed identities, and service principals. Configurable output formats include traditional horizontal results, vertical layouts, and ASCII tables. sqlcmd supports Windows, macOS, and Linux.

Features

  • Cross-platform SQL Server and Azure SQL database connectivity through the native Go database driver
  • Interactive Transact-SQL execution with batch processing, script file support, and piped command input
  • Automated local SQL Server instance provisioning through Docker and Podman container runtimes
  • Persistent database connection contexts with configurable YAML files and generated connection strings
  • Microsoft Entra ID authentication supporting interactive sessions, managed identities, and service principals
  • Customizable query result formatting with ASCII tables, vertical layouts, console coloring, and driver diagnostic logging

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow sqlcmd

sqlcmd Web Site

Other Useful Business Software
Host LLMs in Production With On-Demand GPUs Icon
Host LLMs in Production With On-Demand GPUs

NVIDIA L4 GPUs. 5-second cold starts. Scale to zero when idle.

Deploy your model, get an endpoint, pay only for compute time. No GPU provisioning or infrastructure management required.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of sqlcmd!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Command Line Tools, Go SQL Clients

Registered

8 hours ago