About 7,300 results
Open links in new tab
  1. 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.

  2. 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.

  3. Execute T-SQL from a Script File with sqlcmd - SQL Server

    Nov 18, 2025 · Learn how to use sqlcmd to run a Transact-SQL script file. It can contain Transact-SQL statements, sqlcmd commands, and scripting variables.

  4. Use sqlcmd with Scripting Variables - SQL Server

    Nov 18, 2025 · Many sqlcmd options can be controlled in a script by using the setvar command. In the following example, the script test.sql is created in which the SQLCMDLOGINTIMEOUT variable is …

  5. Commands in the sqlcmd Utility - SQL Server | Microsoft Learn

    Nov 18, 2025 · Control sqlcmd with extra commands for editing, variables, output, and execution control.

  6. Connect to SQL Server with sqlcmd - learn.microsoft.com

    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.

  7. 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 …

  8. Invoke-Sqlcmd (SqlServer) - SQL Server PowerShell

    The Invoke-Sqlcmd cmdlet runs a script containing the languages and commands supported by the SQL Server SQLCMD utility. The commands supported are Transact-SQL statements and the subset of …

  9. SQLCMD Variables in SQL Projects - SQL Server | Microsoft Learn

    Dec 5, 2024 · SQLCMD variables can be used in SQL objects and scripts by wrapping the variable name in $(variableName) syntax. For example, the following SQL script uses the …

  10. Authenticate with Microsoft Entra ID in sqlcmd - SQL Server

    Nov 18, 2025 · sqlcmd (Go) supports more Microsoft Entra authentication models, based on the azidentity package. The implementation relies on a Microsoft Entra connector in the go-sqlcmd driver.