question

nidheesh.r.pillai avatar image
nidheesh.r.pillai asked

Stored Procedure Execution Count

How will you find out the count of how many times a particular stored procedure gets called and executed in a particular time frame in SQL Server?
stored-procedures
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

sqlaj 1 avatar image
sqlaj 1 answered
Have you looked at using sys.dm_exec_procedure_stats? http://msdn.microsoft.com/en-us/library/cc280701.aspx
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
But know that will only show what is currently in cache. If something isn't stored in cache (say because it has a recompile statement) or something ages out of cache, you won't see any record of the execution.
2 Likes 2 ·
nidheesh.r.pillai avatar image nidheesh.r.pillai commented ·
Nope, but now I will! Thanks.
0 Likes 0 ·