9

Would it be possible to suppress all sqlcmd messages output to the cmd window?

I am running a large script and it seems to be slowed down a lot with all the Processed XXXX total records messages.

The script is over 4Gb so there is a large amount of data.

Leigh Riffel
  • 23,884
  • 17
  • 80
  • 155
Agony
  • 449
  • 3
  • 8
  • 14

2 Answers2

12

At the top of the script put the following

SET NOCOUNT ON

That will hide the n rows effected messages.

mrdenny
  • 27,106
  • 2
  • 44
  • 81
11

You could pipe the results to NUL

C:\>sqlcmd -S localhost -d mydb -i C:\stuff.sql > NUL

I don't see any options in sqlcmd to actually suppress output, just to redirect streams to files.

billinkc
  • 16,143
  • 4
  • 54
  • 89