Top "Sqlcmd" questions

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

Sqlcmd to generate file without dashed line under header, without row count

Using the following sqlcmd script: sqlcmd -S . -d MyDb -E -s, -W -Q "select account,rptmonth, thename from theTable" > …

sql-server-2005 sqlcmd
How to suppress hyphens in SQLCMD

How can I suppress hyphens (------------) from the results set of this sqlcmd command: C:\temp>sqlcmd -d AdventureWorks …

sql-server sqlcmd
Need help to write bat file that execute sql scripts in (sql server 2008 and another 3 files.?

I am sure these has been asked before but cannot find clear instruction how to create a batch file lets …

sql sql-server tsql sqlcmd
How to use TAB as column separator in SQLCMD

SQLCMD supports the -s parameter to specify the column separator, but I couldn't figure how how to represent the tab (…

sql-server sqlcmd
Microsoft SQL Server Native Client 10.0 Login timeout expired

I have a freshly installed SQL Server 2008 R2 Express. I'm trying to run SQLCMD locally (please do take note locally) …

sql sql-server sqlcmd sql-server-2008r2-express
How to run a sql script file using sqlcmd and output to both shell and file

I'm trying to run a sql script from a file using sqlcmd, using the following command: sqlcmd -S <server&…

logging sqlcmd
How to pass in parameters to a SQL Server script called with sqlcmd?

Is it possible to pass parameters to a SQL Server script? I have a script that creates a database. It …

sql sql-server scripting parameters sqlcmd
How do I call a stored procedure with arguments using sqlcmd.exe?

I need to call a stored procedure and pass arguments in from Powershell. I think the best option is to …

sql-server stored-procedures powershell sqlcmd
How to get the relative path of file in SQLCMD Mode in SSMS?

I have the below master script which creates tables, and inserts some data and then creates the stored procedures. --todo_…

sql-server ssms sqlcmd
I need best practice in T-SQL Export data to CSV (with header)

What I need to do is export data into CSV file using T-SQL. And I'm very confused about there are …

sql tsql csv sqlcmd sql-agent-job