SQLCMD is Microsoft SQL Server's command line utility that allows you execute T-SQL commands from a command prompt.

learn more… | top users | synonyms (1)

3
votes
1answer
238 views

Named Pipe Provider Error code 40

I have literally tried everything, from enabling named pipe to adding exception to ports in the firewall, to everything possible in surface configuration. I can connect to the SQL instance(using TCP ...
2
votes
1answer
83 views

How to get server cpu, memory, network usage from SQL Server

For reporting purposes, I want to get SQL Server box CPU, memory, network (not SQL Server process alone) and show it in report. Do you have any idea how to pull this? My initial thoughts are run wmi ...
2
votes
0answers
422 views

Network issues with sql server

There are two servers on co-location. First is Windows Server Standard 2008 R2 SP1. Second is Windows Server 2012 + Sql Server Standard 2012 SP1. First server has a task with a report against tables ...
2
votes
0answers
252 views

How to get SQLCMD to output errors and warnings only?

How can you get SQLCMD, when executing a SQL script file, to just output any errors or warnings it encounters? I essentially dont want information based messages to be output.
1
vote
0answers
35 views

sqlcmd returning NUL instead of NULL for tinyint column

sqlcmd -E -d MyDatabase -Q "sp_helpsubscription" -s "," -o file.csv -W -u Column 23 which is suppose to be a tinyint (subscriber_type) is output as NUL instead of NULL when the value is NULL. I ...
0
votes
0answers
15 views

SQL Server, I can execute sqlcmd with trusted connection but not sqlpackage

We have some deployment scripts that use a combination of dacpacs through sqlpackage and straight scripts using sqlcmd. When I execute the sqlpackage dac\sqlpackage.exe ...
0
votes
0answers
16 views

Why is my SSDT pre-deployment script being re-ordered and modified?

Context I'm making an SSDT project for a database design which gets deployed to a number of environments, which each end in their environment name (eg. AFrameworkDEV1, AFrameworkDEV2, BFrameworkDEV1, ...
0
votes
0answers
21 views

Strange behavious with SET options in SSMS

I am investigating the effect of various SET options on the creation of indexed views on SQL Server 2014 CU1. The following code: ensures that the SET options are as they should be creates a table ...
0
votes
0answers
106 views

Error Handling in SSDT (incl. Pre & Post Deployment scripts)

I'm struggling a bit how I should do proper error handling in SSDT, particularly in a pre deployment script. I noticed that for what ever reasons the SQLCMD syntax :on error exit is not working. ...