Negative run_duration values in msdb..sysjobhistory

  • We have noticed some negative values in the run_duration column of the msdb..sysjobhistory catalog view:

    SELECT

    SJH.run_duration

    ,JOB.[name]

    FROM

    msdb.dbo.sysjobs JOB

    INNER JOIN

    msdb.dbo.sysjobhistory SJH

    ON

    JOB.job_id = SJH.job_id

    AND SJH.step_id = 0

    WHERE

    SJH.run_duration < 0;

    Has anyone seen this before and what could be the cause?

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Quick question, why the (nolock) hints?

    😎

  • Eirikur Eiriksson (4/16/2014)


    Quick question, why the (nolock) hints?

    😎

    Hmm, mostly habit I guess... 🙂

    I've removed them, so they do not detract from the "real" issue.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Wild guess: daylight saving?

    -- Gianluca Sartori

  • spaghettidba (4/17/2014)


    Wild guess: daylight saving?

    yes, pretty sure i have seen this when the clocks go back

    ---------------------------------------------------------------------

  • No, we saw some of these on April 14, last weekend.

    They coincide with a sql-agent service shutdown and restart.

    Perhaps some jobs were not stopped cleanly during the shutdown and that may have corrupted these values.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

Viewing 6 posts - 1 through 5 (of 5 total)

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