在调试期间在SSIS中观察变量 [英] Watching variables in SSIS during debug

查看:202
本文介绍了在调试期间在SSIS中观察变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SSIS中有一个项目,我添加了一个执行SQL任务,将其结果发送到一个变量。我想确认这个值,因为我担心它会尝试把它写成一个结果集对象而不是一个实际的整数(在这种情况下我返回一个COUNT)。



我的第一个想法是在调试模式下运行它,并将全局变量添加到我的Watch窗口。不幸的是,当我右键单击Watch窗口时,添加变量的选项是灰色的。我在这里缺少什么?



我已经确认我的变量设置正确,所以我不喜欢把脚本放在做一个MsgBox的值或任何类似的。为了将来参考,我希望能够在调试模式下观察变量。如果有这样的限制,那么我想知道如果有人知道什么和为什么这一切。



这个帮助是非常不足够的并且我可以找到的每个教程只是说:将变量添加到Watch窗口并调试,好像应该永远不会有问题。



谢谢任何见解!

解决方案

我相信只有在断点处停止调试器时,才能向Watch窗口添加变量。如果您在步骤中设置了断点,则当打断断点时,您应该能够在监视窗口中输入变量。您可以在Watch窗口中选择第一个空行,并输入变量名称(您可能会或可能不会获得一些Intellisense,我不记得有多好)。


I have a project in SSIS and I've added an Execute SQL Task which sends its result out to a variable. I wanted to confirm the value because I was worried that it would try to write it out as a resultset object rather than an actual integer (in this case I'm returning a COUNT).

My first thought was just to run it in debug mode and add the global variable to my Watch window. Unfortunately, when I right-click on the Watch window, the option to "Add Variable" is greyed out. What am I missing here?

I've gotten around confirming that my variable is set correctly, so I'm not interested in methods like putting a script in to do a MsgBox with the value or anything like that. For future reference I'd like to be able to watch variables in debug mode. If there are some kind of constraints on that then I'd like to know the what and why of it all if anyone knows.

The help is woefully inadequate on this one and every "tutorial" that I can find just says, "Add the variable to the Watch window and debug" as though there should never be a problem doing that.

Thanks for any insight!

解决方案

I believe you can only add variables to the Watch window while the debugger is stopped on a breakpoint. If you set a breakpoint on a step, you should be able to enter variables into the Watch window when the breakpoint is hit. You can select the first empty row in the Watch window and enter the variable name (you may or may not get some Intellisense there, I can't remember how well that works.)

这篇关于在调试期间在SSIS中观察变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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