有没有办法抑制“x行受影响"?在命令行中的 SQLCMD 中? [英] Is there a way to suppress "x rows affected" in SQLCMD from the command line?

查看:43
本文介绍了有没有办法抑制“x行受影响"?在命令行中的 SQLCMD 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从命令行抑制 SQLCMD 中的x 行受影响"?

Is there a way to suppress "x rows affected" in SQLCMD from the command line?

我正在运行一个 MSBuild 脚本,不希望它阻塞我在构建服务器上的日志.

I'm running an MSBuild script and don't want it clogging up my log on my build server.

我宁愿不必在每个脚本中都添加SET NOCOUNT ON",所以如果有一种方法可以从命令行执行此操作,那就太棒了.

I'd rather not have to add "SET NOCOUNT ON" in every script, so if there's a way to do it from the command line, that would be fantastic.

推荐答案

在脚本中使用 SET NOCOUNT ON 创建启动脚本怎么样(将脚本分配给 SQLCMDINI 环境变量).http://msdn.microsoft.com/en-us/library/ms162773.aspx

What about creating a startup script with SET NOCOUNT ON in the script (assign the script to the SQLCMDINI environment variable). http://msdn.microsoft.com/en-us/library/ms162773.aspx

这篇关于有没有办法抑制“x行受影响"?在命令行中的 SQLCMD 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆