how can execute store procedure step by step in SQ

2019-09-15 04:27发布

问题:

Possible Duplicate:
Debugging Stored Procedure in SQL Server 2008

Is this possible that we can execute Store Procedure Step by Step in SQL SERVER 2008 Like Visual Studio .NET code ?

回答1:

Yes it is possible.

1) In your query window type EXEC YourProcedureName 'Param1', 'Param2'

2) Press F11 - continuously

3) Check the "Locals" window and check the values of your parameters and declared variables

4) You can right-click variables and click "Add Watch"



回答2:

Yes you can (provided you have at least the professional version of visual studio), although it requires a little setting up. Once you've done this, it's not much different from debugging code. MSDN has a basic walkthrough.

Source: Debugging Stored Procedure in SQL Server 2008