December 1, 2011 at 9:06 am
Hi,
Can we get the information of a Stored Procedure like when it is executed lastly or the history of the execution ?
Thanks in Advance!
December 1, 2011 at 10:45 am
Not unless you had some type of monitoring or tracing in place. This isn't captured by default.
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
December 2, 2011 at 4:45 am
Although, you can see an aggregate history of the executions in cache. If you look at sys.dm_exec_query_stats you can find an aggregation of performance metrics for any query still in cache. It'll help, but Steve's right. To really get a full history, you have to set up monitoring. I'd suggest looking into extended events.
----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply