how to trace a SP | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

how to trace a SP

Does anybody know how to trace a SP?
Except SQL-profiler & DBCC inputbuffer(). Thanks.
HJ
A good product : CAST Application Mining Suite from CAST Software… But very expensive 🙁 My own method is to use Query Analyzer and SQL-Profiler :
For example if I have the following stored procedure
CREATE sp_proc @Key INT
AS
SELECT * FROM MyTable WHERE Key = @Key

GO
Instead of executing EXEC sp_Proc @Key = 1 on Query Analyzer, I do :
DECLARE @Key INT
SET @Key = 1
SELECT * FROM MyTable WHERE Key = @Key
… I think that it is a good method because SQL-Profiler allows me to trace my stocked procedures, but also to optimize them.
Jean-Paul FOURNIAUD
thank you for you reply. I’ll try it later.
Another third-party program to consider is Coefficient from Intrinsic Design athttp://www.idisoft.com.
——————
Brad M. McGehee
Webmaster
SQL-Server-Performance.Com
]]>