• Just to add to what Laurie posted...

    The dbo.sysjobhistory system table in MSDB does keep track of duration and both the job and the level. It certainly won't give you the other goodies that an SQL Provile run will give you but it give you a good place to start on long running jobs.

    You can also get some pretty good information, a lot of which is also contained in SQL Profiler, from the sys.dm_exec_requests without actually running SQL Profiler. Of course, you do have to pay attention to recompiles and the times they occur but you can also isolate both the (for example) stored procedure and the part of the stored procedure using the most resources from that view.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)