Friday, March 9, 2012

Job Executes Only First Step

I have three stored procedures that need to run nightly in SQL 7. The three
procedures are not related; but to keep the procedures from running at the
same time, I placed them as three steps of a single job. The first two steps
are set to "Goto next step" on success; the last step is set to "Quit with
success."

The job runs every night. However, only the first step/procedure is
executed. Also, the first step has a green flag next to its ID in the Steps
tab of the job properties

I suppose I could just call all three SPs from a single stored procedure
that is run nightly. But I thought that putting them as three steps in a
single job would cause all three to run. What am I doing wrong?

Thanks!

NeilAre you sure only the first step is executing? If you right click on the
job and choose show history, then check the checkbox to show the steps do
you see all three or only one?

--
Andrew J. Kelly SQL MVP

"Neil" <nospam@.nospam.net> wrote in message
news:KL5If.1367$UN.1000@.newsread2.news.pas.earthli nk.net...
>I have three stored procedures that need to run nightly in SQL 7. The three
>procedures are not related; but to keep the procedures from running at the
>same time, I placed them as three steps of a single job. The first two
>steps are set to "Goto next step" on success; the last step is set to "Quit
>with success."
> The job runs every night. However, only the first step/procedure is
> executed. Also, the first step has a green flag next to its ID in the
> Steps tab of the job properties
> I suppose I could just call all three SPs from a single stored procedure
> that is run nightly. But I thought that putting them as three steps in a
> single job would cause all three to run. What am I doing wrong?
> Thanks!
> Neil|||Yes, you are right. All three steps are executing. There was a problem with
the data which was giving the impression that the job wasn't executing.
Thanks!

Neil

"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OsJ7bwNMGHA.740@.TK2MSFTNGP12.phx.gbl...
> Are you sure only the first step is executing? If you right click on the
> job and choose show history, then check the checkbox to show the steps do
> you see all three or only one?
> --
> Andrew J. Kelly SQL MVP
>
> "Neil" <nospam@.nospam.net> wrote in message
> news:KL5If.1367$UN.1000@.newsread2.news.pas.earthli nk.net...
>>I have three stored procedures that need to run nightly in SQL 7. The
>>three procedures are not related; but to keep the procedures from running
>>at the same time, I placed them as three steps of a single job. The first
>>two steps are set to "Goto next step" on success; the last step is set to
>>"Quit with success."
>>
>> The job runs every night. However, only the first step/procedure is
>> executed. Also, the first step has a green flag next to its ID in the
>> Steps tab of the job properties
>>
>> I suppose I could just call all three SPs from a single stored procedure
>> that is run nightly. But I thought that putting them as three steps in a
>> single job would cause all three to run. What am I doing wrong?
>>
>> Thanks!
>>
>> Neil
>>

No comments:

Post a Comment