Last Execution Date Time of Stored procedure - SQL SERVER 2005

  • Would like to know the Last Execution Date Time of Stored procedure . We use SQL Server 2005.

     

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • First off, wow, running SQL 2005 in 2021, that’s been out of support now for over 10 years, you really really need to get a plan to get that upgraded to SQL2019 and like yesterday.

    Last execution time is subjective as a lot of the dmvs will flush certain plans due to various conditions so you can’t trust the dmvs fully in that as a simple statistics change could flush an old plan from cache and if the proc isn’t executed again for some time won’t have a recent execution time even though it has been executed in the past.

    If you really want that information your going to have to change every procedure and have an audit table to record and update on each execution.  A lot of work but it is what it is with such an old version.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply