How to find the time taken for a sp called in a sql server agent job?

  • Hi ,

    I have couple of sp's called in a job. Need to know the time taken for each sp's.

    Can someone tell me how to find the time taken for a sp called in a sql server agent job?

    Regards,

    Yuva

  • Hi,

    See the sysjobhistory table in the msdb,

    In run_duration col shows the time taken of the job or steps

    ARUN SAS

  • Hi,

    Thanks for your response.

    Regards,

    Yuvarani

  • If the procedures are still in the cache you can query sys.dm_exec_query_stats to see exactly how long the procedure ran, how many resources it used, etc. You can even combine it with sys.dm_exec_query_plan to see the execution plan.

    "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 4 posts - 1 through 4 (of 4 total)

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