阅读背景:

BAT文件中的SQLCMD实用程序 - 如果语法错误,如何返回ERRORLEVEL

来源:互联网 

How can I get %ERRORLEVEL% from SQLCMD utility when some of .sql files contains syntax error? These files create stored procedures. They don't invoke "raiseerror", but they can conatin syntax error and I need to terminate the process. But it always returns %ERRORLEVEL% as 0. I tried use -b, -V and -m (and their combinations), but nothing worked for me as expected.How can I get %ERRORLEVEL% from SQLCMD utility




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: