I want to know how often a set of stored procedures are executed, and the last time they were used.
I am going to add calls to the beginning of each stored procedure in the database to insert / update a table with the following schema:
SprocName ExecCount LastExec
----------------------------------
GetCompany 434 2009-03-02
ExportDist 2 2008-01-05
Obviously, adding code to each sproc is not productive.
Is there a built-in SQL Server 2005 feature that can help?
Or is there a better way?
source
share