在 SQL Server Management Studio 中调试存储过程 [英] Debugging stored procedures in SQL Server Management Studio

查看:96
本文介绍了在 SQL Server Management Studio 中调试存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法单步执行 SQL Server Management Studio 中的存储过程代码?我知道这可以通过 Visual Studio 实现,但我正在寻找来自 Management Studio 的可靠调试解决方案

Is there a way to step into the stored procedure code in SQL Server Management Studio? I know this is possible with Visual Studio, but I am looking for a dependable debugging solution from within Management Studio

推荐答案

仅适用于 SQL 2008 和 SSMS 2008.从菜单调试\开始调试"中选择或按 Alt+F5 将启动分步 T-SQL 调试器.

Only with SQL 2008 and SSMS 2008. Select from menu 'Debug\Start Debugging' or press Alt+F5 and will launch the step by step T-SQL debugger.

在 2005 年,唯一的方法是附加 Profiler 并监视 SP:StmtCompleted 事件,这并不是一步一步的调试器,但至少你会看到执行流程.显然,不能在生产机器上完成.

On 2005 the only way is to attach Profiler and monitor for the SP:StmtCompleted event, which is not exactly debugger step-by-step, but at least you'll see the execution flow. Not to be done on a production machine, obviously.

这篇关于在 SQL Server Management Studio 中调试存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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