Last active
February 25, 2016 22:19
-
-
Save NoahDragon/95fe0dc45d3b4dd5b3c5 to your computer and use it in GitHub Desktop.
Get SQL Server Stored Procedure last run time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Check last time SP ran. | |
select b.name, a.last_execution_time | |
from sys.dm_exec_procedure_stats a | |
inner join sys.objects b | |
on a.object_id = b.object_id | |
where DB_NAME(a.database_ID) = DB_NAME() -- Current database or change it to your database name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment