
Run Transact-SQL Commands with the sqlcmd Utility - SQL Server ...
Nov 18, 2025 · The sqlcmd utility lets you enter Transact-SQL statements, system procedures, and script files using different modes, using go-mssqldb or ODBC to run T-SQL batches.
Download and Install the sqlcmd Utility - SQL Server
Nov 18, 2025 · Learn how to download, install, or find the sqlcmd utility preinstalled on your system.
Use sqlcmd - SQL Server | Microsoft Learn
Nov 18, 2025 · Learn how to use the sqlcmd for ad hoc interactive execution of Transact-SQL statements and scripts, and automate Transact-SQL scripting tasks.
Commands in the sqlcmd Utility - SQL Server | Microsoft Learn
Nov 18, 2025 · Control sqlcmd with extra commands for editing, variables, output, and execution control.
Start the sqlcmd Utility - SQL Server | Microsoft Learn
Nov 18, 2025 · Learn how to start the sqlcmd utility, which lets you enter Transact-SQL statements, system procedures, and script files, in SQLCMD mode or in scripts and jobs.
SQL Command-Line Utilities (Database Engine) - SQL Server
Jul 10, 2025 · Command prompt utilities enable you to script SQL Server operations. This article lists many command-line utilities that ship with SQL Server.
Connect to SQL Server with sqlcmd - SQL Server | Microsoft Learn
Nov 18, 2025 · Learn how to select which protocol sqlcmd uses to communicate with SQL Server. The choices are: TCP/IP, named pipes, and shared memory.
Install the sqlcmd and bcp SQL Server command-line tools on Linux
Aug 21, 2025 · sqlcmd and bcp are available in mssql-tools18 for x64 and arm64 architectures. For a modern alternative across Linux, macOS, and Windows, see go-sqlcmd utility.
Use sqlcmd with Scripting Variables - SQL Server
Nov 18, 2025 · Scripting variables can be defined explicitly by using the setvar command, or implicitly by using the sqlcmd -v option. This article also includes examples defining environmental variables at …
sqlcmd Utility - Edit SQLCMD Scripts with Query Editor - SQL Server
Jul 2, 2025 · You use SQLCMD scripts when you have to process Windows System commands and Transact-SQL statements in the same script. Learn how to write and edit SQLCMD scripts using the …