Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

How many jobs are currently in progress...

  • How many jobs are currently in progress.
  • For the longest running jobs are the target logs being updated - if not, the job may have died or not been recovered after a restart/crash.
Code Block
    select s.ServerID,  convert(nvarchar(50), s.Hostname) as Hostname, tp.Name as JobPhase, ts.Name as JobStatus, j.JobId, ParentJobID, convert(nvarchar(50), j.Hostname) as Hostname, j.IPAddressBinary, IsComplete, StartDate, EndDate, DATEDIFF(hh, StartDate, getDate()) as 'Duration {Hours)',   q.JobStatusID, 
           '            QUEUE DATA  -->          ', js.name as QueueStatus, DisabledUntil, [Priority], Source, QueueId, IgnoreConfiguredIPs
      from jobs.t_Job j
     inner join config.t_Server s on j.ServerID = s.ServerID
     inner join jobs.t_TargetStatus ts on j.TargetStatusID= ts.TargetStatusID
     inner join jobs.t_TargetPhase tp on ts.TargetPhaseID = tp.TargetPhaseID
     inner join jobs.t_Queue q on j.JobId = q.JobID
     inner join jobs.t_JobStatus js on q.JobStatusID = js.JobStatusID
     where IsComplete = 0

...