I am executing a bunch of SQL scripts using SQLCMD, and redirecting the output to a log file using the -o switch. How do I turn off the output of SELECT queries? Errors, if any, should still be written to the log file, as usual.
I am executing a bunch of SQL scripts using SQLCMD , and redirecting the
Share
If you want to log only errors, log by redirecting
STDERRrather than by using the-oswitch:update
Added that the
-r0switch must be set to redirect errors toSTDERR