Sunday, December 2, 2007

How to skip a job stuck on adworker while applying a patch

In this post, i would like to share the steps to skip a job while applying the patch. Well, we are all aware of the hidden option "8" in adctrl which will skip a job. However, consider this situation, you have started a patch and you discover that there is a SQL that is sitting on one of the adworkers doing nothing. You wont be able to progress with the patch because, the patch will not complete unless the "stuck" job on the worker completes. The option 8 will work only when the jobs have failed and the adpatch process has stopped due to the failed jobs.

The following steps will help in this situation:

1. Identify the "process" from v$session of the "stuck" job.
2. On the middle tier where the adpatch process is running, terminate the process with the process id as identified in the first step. (Killing the session on database should also work)
3. You will see that the job fails with "deferment number 1" and some other worker (or the same worker) will pick up the same job
4. Repeat step 1 and 2 again.
5. You will again see the job fail - this time with "deferment 2" and again the job would be started.
6. Repeat step 1 and 2 again.
7. This time, the adpatch will come to a halt reporting an error with the job you are after.
8. Use option 8 in adctrl this time to skip the worker and get over the patch.

- Aravind Kamath

No comments: