July 1, 2015 at 5:53 am
Hi all,
I have a SQL Agent job that runs at 4:15 in the morning. The job has 5 steps, each step only runs if the preceding step succeeds. The second step, which calls an SSIS package that does the main processing, appears to finish as it goes on to the next step; however, when looking in 'View History' there are 2 entries for this step - the first one shows it as still running (Circled Green Arrow) but with a start and end time. The second entry says the job succeeded.
The attachment shows you what I mean.....
I have been seeing conflicts, such as deadlocks, with later jobs. I suspect this job is causing the conflicts - maybe the package is still running in the background instead of having actually completed?
The question really is, does anyone know under what conditions a job step my be showing in the job history as both running AND completed successfully? What should I be looking for to find out what is going on?
Any suggestions gratefully received.
Sean
July 1, 2015 at 6:28 am
Job history does not show information for running executions of the job. It only show information for the latest completed execution.
-- Gianluca Sartori
July 1, 2015 at 6:40 am
Hi Gianluca, yes I know that, which is why I asked the question "What should I be looking for to find out what is going on?". As in, what would cause it to think something is still running when it has completed?
July 1, 2015 at 7:01 am
What does job activity monitor say? Does it display the job as executing or completed?
-- Gianluca Sartori
July 1, 2015 at 7:15 am
Running sp_help_jobhistory shows it with run_status = 4 - i.e. In-Progress. However, it returns a row above it with all the exact same details (date, time, duration etc) with a run_status = 1 (succeeded). The Job Activity Monitor shows it as Idle / Last Run Outcome = Succeeded.
July 1, 2015 at 8:32 am
Weird, I never came across such a situation.
Sorry for being unhelpful.
-- Gianluca Sartori
July 1, 2015 at 9:33 am
Yes, it is weird.....!
And not at all, thank you for taking the time to try and help, it's appreciated.
July 26, 2017 at 2:00 pm
Not sure if you every resolved this issue. I don't know if you issue was the same as mine, but I got this also and thought this was weird.
1. Check to make sure it really is not running
select * from sys.dm_exec_sessions where status = 'running'
2. Make sure under job step > advanced > include step output in history is uncheck.
October 27, 2023 at 2:04 pm
WoW! We are using SQL Server 2022 and were facing same issue. This is the only blog that I could find and it helped me resolve the issue.
Thanks, Steve for the guidance
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply