August 23, 2012 at 7:51 am
We have some jobs that rely on a connection to Oracle. This connection is not reliable and we frequently end up with the job hanging indefinately. If we stop the job manually, it stops quickly with no ramifications to the data on either side as we can just run the job again and it'll update properly (when it finally runs to completion). The job normally takes around 10 minutes when it works properly.
Sometimes the jbo simply fails when we lose the connection, other times it hangs until we tell it to stop.
Is there a way to terminate the job programmatically after a set amount of time? If the job has been running for more than 30 minutes, I want to terminate it no matter what.
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
August 24, 2012 at 2:58 am
Stefan Krzywicki (8/23/2012)
We have some jobs that rely on a connection to Oracle. This connection is not reliable and we frequently end up with the job hanging indefinately. If we stop the job manually, it stops quickly with no ramifications to the data on either side as we can just run the job again and it'll update properly (when it finally runs to completion). The job normally takes around 10 minutes when it works properly.Sometimes the jbo simply fails when we lose the connection, other times it hangs until we tell it to stop.
Is there a way to terminate the job programmatically after a set amount of time? If the job has been running for more than 30 minutes, I want to terminate it no matter what.
Have a look at
http://www.sqlservercentral.com/Forums/Topic1167821-1550-1.aspx#bm1169007
and see if it helps
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply