Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to debug a stored procedure?
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01544351
Message ID:
01544355
Views:
26
>>>How do you debug a stored procedure which is called from .NET method? That is, I would like to see the variables passed and some other values.
>>>
>>>TIA
>>
>>You can run a profiler to get the exact call of this SP. Then you should be able to debug it from SSMS using that call.
>>
>>Also, are you able to debug from VS directly?
>
>I will have to read on how to run a profiler; I don't know how. Neither do I know if/how to debug from VS. A lot to learn.
>Thank you.

Simply go to Tools menu and select Profiler. Run the trace at the moment you're calling your SP in .NET. Stop the trace (click on stop button). Grab the exact command you'll see at the bottom pane. Copy this commant to SSMS and run to see result. Then put a breakpoint on that call and call Debug instead of Execute to debug it.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform