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: Radoulov, Dimitre <cichomitiko_at_gmail.com>
Date: Wed, 1 Nov 2006 13:25:50 +0100
Message-ID: <4548924d$0$49208$14726298@news.sunsite.dk>

> 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!!
[...]

What is the output from trap -p ?

> 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

The code is wrong.
You could write it like this:

set -- "${FILEPREFIX}"*
[ -e "$1" ] 2>&- || echo "Cannot read ${FILEPREFIX}* - Exiting"

Will NOT work, because the exit status is 0 for success (the echo command succeeds).
In your case you can use:

set -- "${FILEPREFIX}"*
[ -e "$1" ]

So:

$ ls XYZ*
XYZ XYZpippo

$ set -- "${FILEPREFIX}"*
$ [ -e "$1" ]
$ echo $?

0

> 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
[...]

Check MetaLink for "Not owner".

> Nearly there I can see the light!

Regards
Dimitre Received on Wed Nov 01 2006 - 06:25:50 CST

Original text of this message

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