November 16, 2013 at 5:53 am
Hello
when I'm executing my stored procedure, one of my output didn't back any value.
How can I see the value of parameters in my stored procedure when I'm running it.(I want to do something like Press F10 in programming)
in fact I want to trace my stored procedure
November 16, 2013 at 6:29 am
November 16, 2013 at 6:32 am
Yes I try it but I think I didn't do it correct, I don't know how can I debug it?
November 16, 2013 at 6:41 am
Remember that I can't look over your shoulder so I can't tell you what you might have done wrong.
Based on your very vague statement there's very little I can do.
My only advice: use google to find a walk-through editorial. I'm sure those are out there....
November 16, 2013 at 7:00 am
If you want to see the value of a variable at a certain point during execution and can't get debug to work, the PRINT (http://technet.microsoft.com/en-us/library/ms176047%28v=sql.100%29.aspx) and SELECT (http://technet.microsoft.com/en-us/library/ms189499%28v=sql.100%29.aspx) statements work fine.
November 16, 2013 at 7:14 am
You can trace each statement within the procedure by using Extended Events. You can set up to capture each statement start and end. That will give you precise information on each step, how long it took, everything. Just know that you need to set up your filters on the events appropriately or you'll see all the statements for all the procedures, which you don't want. This will get you started.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply