aa*****@the-mdu.com (Simon) wrote in message news:<f5**************************@posting.google. com>...
Dear All
A quick question:
I run a set of scheduled jobs. The jobs run Stored Procedures.
However, if the sproc fails, the job quits and moves on to the next
one. However, the sproc should carry on. E.g, IF find bad records,
EXPORT to file, GO TO NEXT RECORD (BUT DON'T QUIT THE SPROC). The job
scheduler does not allow this, therefore, the sproc does not get a
chance to finish.
Is there a way to ensure a sproc can finish before moving on to the
next step?
Thanks
Simon
I'm not sure I understand you exactly - I guess the issue is not
really the scheduling, but rather how to handle an error in your
stored procedure? If the procedure exists because of an error, then
control goes back to the scheduled job. You could set a number of
retry attempts for that job step, but it would probably be better to
handle or prevent the error in your procedure. There are some useful
articles here:
http://www.sommarskog.se/index.html
If this isn't helpful, perhaps you could post (some of) your procedure
code to show where it fails, along with the error message, and someone
may be able to suggest how to handle the error condition.
Simon