• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1005
  • Last Modified:

SQLCMD not returning same results as SQL Management Studio

I have a question about the behaviour of SQLCMD vs the behaviour of the Management Studio's handling of the same operation.  In the Management Studio multiple executions of the indicated line in the attached File result in multiple lines of output showing:

(1 row(s) affected)

If SQLCMD is used to run the identical stored procedure, with the identical results occuring in the database, only the first running of EXEC (@FixInstruction) results in visible output, and subsequent executions result in the desired data changes, but no visible output.  Is there an option for SQLCMD which will correct this?

This is SQL Server 2005 (9.0.5057) running in Server 2008 SP2, with Management Studio 9.00.5000.00 and SQLCMD 9.00.5000.00 NT INTEL X86.

I would appreciate any suggestions.

1 Solution
It looks like this may be a known issue with sqlcmd.exe:


Those are pretty weak workarounds, though.  Do you have a newer version of sqlcmd available for testing?  Best of luck!
VB6chuckAuthor Commented:
It does look like a known issue.  I'm not allowed rights to install newer SQLCMD on the user's workstation, so I'll probably go with a small VB6 TSQL utility I've got already and see what results I get with it.


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now