JohnO'Mullane

What is the expected behavior when SQL agent is restarted while SQL Job running

Discussion created by JohnO'Mullane on Jan 16, 2018
Latest reply on Jan 23, 2018 by JohnO'Mullane
Hi,
I noticed a situation today where one of my SQL Jobs was running at a moment in time when I restarted my SQL agents.
This caused the SQL Job (Part of a workflow) to fail with status 

"ENDED_LOST - ended undefined (host terminated prematurely)."

I also noticed in the messages the following

"U02000198 Restore of Jobs is not implemented in this Agent"

So, I took a look at my SQL .ini and can see that there are 2 "retry" entries.

[SQL]
connect=60
retention_time=180
retry=15
type=ORACLE
useOraClient=0
retry=0

I would have expected this job not to fail but try to run again but it looks like the second "retry" entry is overwriting the first one.

If I remove the second entry, will my Job then wait and retry or is restarting my SQL agent actually causing the Job to break and so automatic recovery not possible?

I'm not sure if this "retry" setting will only retry if it cannot connect to DB or will retry if agent is down.

Thanks,
John.




Outcomes