Home Forums SQL Server 7,2000 Administration SQL 2000 - How long has a job (all steps inclusive) been running? RE: SQL 2000 - How long has a job (all steps inclusive) been running?

  • lptech (11/26/2013)


    Start with the sysjobactivity table, and you should be able to come up with something that fits your needs.

    I don't have a 2000 server to test agaisnt, but assuming the table is still the same, i *think* this will give you teh results you are looking for?

    SELECT

    DATEDIFF(minute,start_execution_date,getdate()) AS ElapsedMinutes,

    *

    FROM msdb.dbo.sysjobactivity

    WHERE start_execution_date IS NOT NULL

    AND stop_execution_date IS NULL

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!