0

I have several dozen SQL Server jobs that the Job Activity Monitor displays that do not appear to have executed.

Tools used and Version details:

Microsoft SQL Server Management Studio 12.0.6024.0 
Microsoft Analysis Services Client Tools 12.0.6024.0 
Microsoft Data Access Components (MDAC) 6.3.9600.17415 
Microsoft MSXML 3.0 6.0 
Microsoft Internet Explorer 9.11.9600.19375 
Microsoft .NET Framework 4.0.30319.42000 
Operating System 6.3.9600

None of the research I have done is providing me any clues as to why these jobs fail to execute. The description for all of these jobs is the same:

Status: Idle Last Run Outcome: 
Unknown Last Run: Never 
Next Run: Not Scheduled 
Category: Uncategorized Runnable: 
No Scheduled: about 1/2 Yes, about 1/2 No

I'm expecting to see that these jobs were successfully executed and completed.

  • 1
    They haven't ran because they aren't scheduled to run. Next Run: Not Scheduled. Try scheduling the job – scsimon Nov 4 at 22:00
  • @scsimon That's the thing though, these jobs are script-scheduled to execute just like all of the other jobs that do actually execute. – user3242558 Nov 4 at 23:33
  • Log says these jobs are '[180] Job...was deleted while it was executing. The outcome was [unknown]' – user3242558 Nov 4 at 23:36
  • So someone deleted and recreated it? What’s the script doing? Can you post that code – scsimon Nov 4 at 23:46
0
use msdb
go
select 
s.job_id, 
s.name as jobname, 
h.step_id, 
h.step_name,
case when run_status = 0 then 'Failed'
when run_status = 1 then 'Succeeded'
when run_status = 2 then 'Retry'
when run_status = 3 then 'Canceled'
when run_status = 4 then 'In Progress'
end as runstatus ,
h.message ,
h.run_date ,
h.run_time ,
h.run_duration as 'dusration(s)'
from dbo.sysjobs as s
inner join  dbo.sysjobhistory as h on s.job_id = h.job_id
order by h.run_date desc, h.run_time desc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.