VSTSC's Community Server

Community Server: The platform that enables you to build rich, interactive communities.
VSTeamSystemCentral: Your Team System community!


Welcome to VSTSC's Community Server | | Help
in Search

Tim Benninghoff

A SQL Server DBA attempts a personal IT project and documents the (mis)adventures.

Any Number You Want As Long As It's 1

Any customer can have a car painted any colour that he wants so long as it is black. - Henry Ford in his autobiography "My Life and Work"

SQL Server has a stored procedure for creating new SQL Agent jobs called , and this stored procedure has a parameter named @start_step_id.  However, when you try to create a new job with a start step other than 1, you get the following error:

Msg 14266, Level 16, State 1, Procedure sp_verify_job, Line 75
The specified '@start_step_id' is invalid (valid values are: 1).

As the error indicates, and we can verify by digging into the code, sp_add_job also kicks off an undocumented stored procedure called sp_verify_job.  Looking at the code of sp_verify_job, we find this little nugget in the comments:

 For [new] MSX jobs we allow the start step to be other than 1 since
    --       the start step was validated when the job was created at the MSX

 Since I've never been anywhere that created multiserver environments, I'll have to take their word for it, although I did begin to suspect that if you created a job on a master server using sp_add_job you'd only be able to start at step 1, and that this parameter is really just so that the multiserver environment can use it to migrate jobs around.

 What's my main point?  Documentation is our friend.  I shouldn't have to dig into a nested stored procedure to find out that there is really no way that I, a humble user, can take advantage of the @start_step_id, and I should in turn not subject my fellow database professionals to this sort of information chase.

 

Published Thursday, April 09, 2009 9:29 AM by timbenninghoff

Comments

No Comments
Anonymous comments are disabled
Powered by Community Server (Personal Edition), by Telligent Systems