Home > Archive > MS SQL Server > September 2005 > Scheduling an sp









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Scheduling an sp
dan artuso

2005-09-30, 8:23 pm

Hi All,
I hope I can explain this well.
I have an sp that populates certain tables with historical data and I've
scheduled
a job (using EM) that runs this sp on the first day of each quarter.
My question is, within the sp, if anything goes wrong, I do a rollback and
issue
a Return(5). Will this be interpeted as a failure within the job? Somehow I
think not.

So, how do I indicate failure to the job that schedules the sp?



Dan



Jerry Spivey

2005-09-30, 8:23 pm

Dan,

Add a RAISERROR statement to your stored procedure.

HTH

Jerry
"dan artuso" < dartuso@NOSPAMpagepe
arls.com> wrote in message
news:OjXqmJfxFHA.2924@TK2MSFTNGP15.phx.gbl...
> Hi All,
> I hope I can explain this well.
> I have an sp that populates certain tables with historical data and I've
> scheduled
> a job (using EM) that runs this sp on the first day of each quarter.
> My question is, within the sp, if anything goes wrong, I do a rollback and
> issue
> a Return(5). Will this be interpeted as a failure within the job? Somehow
> I think not.
>
> So, how do I indicate failure to the job that schedules the sp?
>
>
>
> Dan
>
>
>



dan artuso

2005-09-30, 8:23 pm

Thanks Jerry

Dan


"Jerry Spivey" <jspivey@vestas-awt.com> wrote in message
news:u7haHMfxFHA.1148@TK2MSFTNGP11.phx.gbl...
> Dan,
>
> Add a RAISERROR statement to your stored procedure.
>
> HTH
>
> Jerry
> "dan artuso" < dartuso@NOSPAMpagepe
arls.com> wrote in message
> news:OjXqmJfxFHA.2924@TK2MSFTNGP15.phx.gbl...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com