Have you ever wanted to find out the last time a stored procedure was executed, if ever? Here is a T-SQL snippet that will return the date and time of the last execution of the list of stored procedures provided in a the WHERE clause listed. It will return NULL for those stored procedures that have never been executed.
FROM sys.dm_exec_procedure_stats dmv_eps
RIGHT JOIN sys.objects syso
ON syso.[object_id] = dmv_eps.[object_id]
WHERE syso.name IN ('usp_sproc1', 'usp_sproc2', 'usp_sproc3')
ORDER BY syso.name
Views – 511