• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1032
  • 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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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