79713846

Date: 2025-07-24 19:00:21
Score: 2
Natty:
Report link

I'd been looking for this very thing recently and had no luck. We've had a couple of jobs show as BROKEN recently, despite no failures, and I needed to test a script to automatically identify these and notify us of them.

What finally worked:

  1. Set up a job that ran an invalid procedure, i.e. was guaranteed to fail.
  2. Ran it a few times. All FAILED, no BROKEN.
  3. Changed max_failures attribute to something low

exec DBMS_SCHEDULER.SET_ATTRIBUTE(name => 'MYJOB', attribute => 'max_failures', value => 2);

  1. Reran.

Success! Querying DBA_SCHEDULER_JOBS shows this as 'BROKEN'.

As a side note: simply trying to re-enable the jobs that broke, and re-run them, just gave the BROKEN status again. I had to basically copy the existing job creation script, then drop and recreate the identical job.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): no luck
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: JOATMON