Question

I'd like to find the best way to handle exceptions (failure of any steps) from an Oracle scheduler job chain (11gR2).

Say I have a chain that contains 20 steps. If at any point the chain exits with FAILURE, I'd like to do a set of actions. These actions are specific to that chain, not the individual steps (each step's procedure may be used outside of scheduler or in other chains).

Thanks to 11gR2, I can now setup an email notification on FAILURE of chain, but this is only 1 of several actions I need to do, so its only a partial solution for me.

The only thing I can think of is have another polling job check the status of my chain every x minutes and launch the failure actions when it sees the latest job of the chain exited with FAILURE status. But this is a hack at best imo.

What is the best way to handle exceptions for a given job chain?

thanks

Was it helpful?

Solution

The most flexible way to handle jobs exceptions in general is to use a job exception monitoring procedure and define the jobs to generate events upon job status changes. The job exception monitoring procedure should watch the scheduler event queue in a loop and react upon events in a way you define.

Doing so takes away the burden to have to create failure steps for about each and every job step in a chain. This is a very powerful mechanism.

by lack of time: in the book is a complete scenario of event based scheduling. Will dig one up later.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top