获取当前执行的SQL游标语句
http://msdn.microsoft.com/en-us/library/ms190346.aspx
它在语句开始/结束偏移下的部分中表示您可以将其与 dm_exec_sql_text 结合使用来获取当前正在执行的游标语句。这样做的命令是什么?
我有一个相当大的 SP,当它到达游标逻辑循环 'while (@@fetch_status =0) 时冻结,我想看看它是否是我认为的确切执行语句,我也想查看此语句的参数,以便我可以准确地了解为什么游标从未退出,或者只是为什么循环内的语句无法完成。谢谢!
http://msdn.microsoft.com/en-us/library/ms190346.aspx
It says here in the section under the statement start/end offset that you can use that in conjunction with dm_exec_sql_text to get the currently executing cursor statement. What would be the command for that?
I have a fairly large SP that froze when it reached a cursor logic loop 'while (@@fetch_status =0) and I'd like to see if it is the exact executing statement I think it is, and I'd also like to see the parameters for this statement so I can see exactly why the cursor either never exited, or just why the statement inside the loop won't complete. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从这个开始
start with this