Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How can I see the value of parameters in stored procedure? Expand / Collapse
Author
Message
Posted Saturday, November 16, 2013 5:53 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, June 17, 2014 12:52 AM
Points: 36, Visits: 101
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
Post #1514905
Posted Saturday, November 16, 2013 6:29 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 9:18 AM
Points: 6,829, Visits: 13,290
Did you try to use the Debug mode in SSMS?



Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1514908
Posted Saturday, November 16, 2013 6:32 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, June 17, 2014 12:52 AM
Points: 36, Visits: 101
Yes I try it but I think I didn't do it correct, I don't know how can I debug it?
Post #1514910
Posted Saturday, November 16, 2013 6:41 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 9:18 AM
Points: 6,829, Visits: 13,290
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....




Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1514913
Posted Saturday, November 16, 2013 7:00 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:48 PM
Points: 4,053, Visits: 3,490
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.



Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Post #1514915
Posted Saturday, November 16, 2013 7:14 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 9:27 PM
Points: 13,776, Visits: 28,178
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
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1514917
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse