Top "Sqlcmd" questions

SQLCMD is a command line tool used to run SQL batches on Microsoft SQL Server.

Unicode support for Invoke-Sqlcmd in PowerShell

The PowerShell sqlps module provides core support for SQL Server access from within PowerShell and its Invoke-Sqlcmd cmdlet is its …

sql-server powershell unicode sqlcmd
sql scripting variable default value

I have a script file e.g. test.sql. I want to call this from another script, say caller.sql, …

sql-server sql-server-2005 sqlcmd
Escaping Space Character using setvar in SQL Server Management Studio

Firstly, I'm not a DBA and I don't have any (admin) experience with SQL Server, so please use words with …

sql-server-2008 sqlcmd
ServerConnection.ExecuteNonQuery in SQLCMD Mode

I am using the Microsoft Data-Tier Application framework to create a deployment script based on a DacPackage object. I am …

c# sql-server sqlcmd data-tier-applications sql-server-data-tools
Is it possible to automatically force SQLCMD mode in script?

We're using Visual Studio Database Professional and it makes heavy use of SQLCMD variables to differentiate between environments while deploying. …

sql sqlcmd ssms
Export SQL query result to CSV

I'm using sqlcmd to export a query result with two columns to csv. The simple query is: SELECT DISTINCT CustomerGuid, …

sql sql-server excel sqlcmd
"Login timeout expired" error when accessing MS SQL db via sqlalchemy and pyodbc

So I have some trouble getting sqlalchemy and pyodbc working with a remote MS SQL Server. Local sqlcmd worked properly …

sql-server sqlalchemy pyodbc sqlcmd
passing path to SqlCmd within powershell script

I'm trying to write a powershell script which will execute sqlcmd.exe to run a sql script. The script contains …

powershell sqlcmd
SQLCMD :r <path> where path is a variable

Does the SQLCMD command :r support non-constant literal paths? For example: setvar $(path1) '.\script.sql' :r $(path1) -- SQL01260: …

sqlcmd