Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_SCHEDULER external jobs failing but status of SUCCEEDED?!?!

Re: DBMS_SCHEDULER external jobs failing but status of SUCCEEDED?!?!

From: Althalus <toby_at_technical-it.co.uk>
Date: 1 Nov 2006 04:01:28 -0800
Message-ID: <1162382488.926253.125990@m7g2000cwm.googlegroups.com>

Radoulov, Dimitre wrote:
> What OS?
> You could try to force the script to pass the exit status (even if on most
> systems the code you posted would pass it automatically):
>
> ls "${1}"*
> exit "$?"
>

OS is AIX.

Interesting, with the exit "$?" additonal_info has - STANDARD_ERROR="#!/bin/ksh -xv

cd /home/hubbatch/era/staging
+ cd /home/hubbatch/era/staging

ls ${1}*
+ ls XYZ*
XYZ* not found
exit "$?"
+ exit 0"

So it would seem the shell is returning an exit code of 0 (meaning the scheduler thinks it succeeded) yet the ls failed!!

I have added to the shell -
if [ `ls -l ${FILEPREFIX}* 2>/dev/null | wc -l` = 0 ] then
  echo "Cannot read ${FILEPREFIX}* - Exiting"   exit 1
fi

Ok so now the fun begins, the job FAILED (woohoo) in addtional_info - ORA-27369: job of type EXECUTABLE failed with exit code: Not owner

Ah. Huh? If I increment the exit code from 1 to 2 I get - ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory

Now thats more like it. But I seem to have lost the "STANDARD_ERROR=XYZ* not found". Thats rather nice as it shows the file it was looking for...

Nearly there I can see the light! Received on Wed Nov 01 2006 - 06:01:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US