Besides using SQL Server Profiler, is there any way to track which stored procedures are being used, or at least when they were last executed?
SQL Server Stored Procedures – Tracking Stored Procedure Usage in SQL Server 2008
sql serversql-server-2008statistics
Related Question
- Sql-server – How to reliably track stored procedure ( and functions ) use over time
- How to Identify Unused Stored Procedures in SQL Server
- Execute Stored Procedure Remotely Using Linked Server
- Sql-server – How to see what called a stored procedure
- SQL Azure – Capture Live Stored Procedure Calls with Query Profiler
- SQL Server – Tracking Last Execution Date of a Query
- Sql-server – T-SQL Stored Procedure Returns Before Completing
- SQL Server – How to Get Parameter Values of a Stored Procedure in Execution
Best Answer
You can look in the plan cache to get a pretty good idea of Stored Procedure usage. Take this query, for instance:
This will give you the
usecounts
of the stored procedures that are cached pertaining toSomeDB
.Note: the plan cache contains the execution plans. This retention of these plans has many factors involved. Whereas this will give you a good idea of what is being used and how often, it's definitely not the running total of stored procedures and how often/when they were executed.
BOL Reference about the Plan Cache