Unanswered: How to obtain APP_ID of a running Schedular task ??
DB2 V 9.5 FP 4 on Win 2K3
I need to terminate a long running Task in DB2.
How can I do that ?
Here is the situation. Nightly after 12:00 any time (12:10 actual) our scheduler starts Player_Stats job, next one is Prifit_Loss job, Third one is Online_Backup. there are many more, but these three are in question for now.
First two are less important than third one. First two take about 2 minutes each and OnlineBackup takes about 3 hours.We prefer to run first two so that their result (effect) is included in image and get reflected in Mirror.
Suppose Job 1 hangs ( or runs Longer) then Online Backup gets delayed. Beacuse I chained all three in series. Same with second job.
Normally this setup works fine. But once a while one of the first two jobs delay everthing. I do not want to delay online backup at the cost of first two.
So clearly I will breack the chain and schedule online backup seperatly(independently). After doing that,I would want to deal with first two or any of first two if takes longer.
In case it takes longer, I want to terminate and restart the same for 3 times. This way these jobs will finish within 30 mins and result will be included in backup.
Is there a way to get APP_ID for first two jobs so that I can force them if they take over 10 minutes.