BUG: SQLAgent T-SQL Job Does Not Respect SET NOCOUNT ON When Sending Output to File (294412)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q294412
BUG #: 353170 (SHILOH_BUGS)
SYMPTOMS
When you create a T-SQL job step that contains SET NOCOUNT ON, and you send the results to an output file, that file may still contain the rowcount line.
WORKAROUND
Change the job step type to Operating System Command (CmdExec) and Osql.exe. If it's a single query, pass the query using the -Q parameter and specify the output file using the -o parameter.
If the job step contains multiple queries, save them in a script file, pass the script file to Osql.exe using the -i parameter, and specify the output file using the -o parameter. For more information, see SQL Server Books Online.
STATUS
Microsoft has confirmed this to be a problem in SQL Server 2000.
Modification Type: | Major | Last Reviewed: | 11/6/2003 |
---|
Keywords: | kbbug kbpending KB294412 |
---|
|