Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
    
Are you talking about N rows affected message or is your script itself printing those messages? Is routing the output to a file any more palatable? –  billinkc Aug 5 '12 at 16:52

2 Answers 2

At the top of the script put the following

SET NOCOUNT ON

That will hide the n rows effected messages.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.