Welcome to SqlServer-QA.net Sign in | Join | Help

SQL Server Storage Engine & Tools (SSQA.net)

SQL Server Tools includes storage engine that includes a complete set of graphical tools and command prompt utilities that allow users, programmers, and administrators. SSMS, SSRS, SSIS & SSAS are most commonly used tools.
How to suppress SQLSTATE messages when executing scripts using SQLCMD?

Say you are executing a scheduled job using a batch file and output is stored to a file, then in that output file you will see Warning messages such as SQLSTATE. So how to suppress these messages on the output file.

Simply using -i option in SQLCMD as input file by putting the relevant queries in this file, and as usual using -o option for output file. When you execut queries from the SQLAgent job step all the execution results are appended to the output file, so it is better to run this as a SQLCMD step by using input & output file.

Posted: Tuesday, November 06, 2007 10:48 AM by SQL Master

Comments

Other SQL Server Blogs around the Web said:

Say you are executing a scheduled job using a batch file and output is stored to a file, then in that

# November 6, 2007 10:59 AM

SSQA.net - SqlServer-QA.net said:

Say you are executing a scheduled job using a batch file and output is stored to a file, then in that

# November 6, 2007 11:51 AM
Anonymous comments are disabled