Last Execute Procedure

  • Hi Experts,

    I have lot of unwanted procedures in my Database,
    I want to remove unwanted procedures from my production Server,
    how do i get the last executed date and time for a particular Procedure

    Eg:-
    Object_Name         executed_time
    Procedure_001        2018-04-27 12:00
    Procedure_002        2018-04-27 04:00
    Procedure_003        2018-04-26 12:00
    Procedure_004        2017-12-31 01:00
    Procedure_005        2016-04-01 10:00
    Procedure_006        2015-01-01 11:30

    Thanks
    Mohamad Feroz Patel

    Patel Mohamad

  • You can only get that information if you are gathering query metrics in some fashion. Since you're posting in a 2008 forum, the general method for this is to use trace events. Here's an article to get you started. Just remember, even if you gather data for a week, some queries may only be run monthly, or quarterly or annually. You'll need to apply an understanding of what a queries purpose is as well as whether or not it has been accessed in the last week.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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