Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Turn of BCP Msgs

Author  Topic 

MIK_2008
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2011-03-21 : 05:28:08
Hi folks,

I have a stored procedures which is using BCP command to Generate Excel Reports. Below msgs are displayed as a result of execution of that Stored Procedure.

Need to know if there's any way to turn off the messages displayed by the BCP command e.g.

NULL
Starting copy...
NULL
86 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.): total 16
NULL


Many thanks!

Cheers
MIK

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-21 : 12:50:06
You can use the NO_OUTPUT option of the xp_cmdshell command along with bcp.exe.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

MIK_2008
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2011-03-22 : 03:19:56
thanks Tara!

Cheers
MIK
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-22 : 10:18:11
You're welcome, glad to help.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -