Job Step Action Constants (SQLDMO_JOBSTEPACTION_TYPE)

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Job step action constants specify simple logic for SQL Server Agent jobs. With SQL Distributed Management Objects (SQL-DMO), use job step action constants and the OnSuccessAction and OnFailAction properties of the JobStep object to implement job step-based logic for a multistep job.

Constant

Value

Description

SQLDMOJobStepAction_/GotoNextStep

3

Default for OnSuccessAction property. On successful execution, execution continues at the next defined step.

SQLDMOJobStepAction_/GotoStep

4

Job step execution continues at the specified step. If OnSuccessAction is SQLDMOJobStepAction_GotoStep, the OnSuccessStep property specifies the next-executed step. If OnFailAction is SQLDMOJobStepAction_GotoStep, the OnFailStep property is used to specify the next-executed step.

SQLDMOJobStepAction_/QuitWithFailure

2

Default for the OnFailAction property. On failed execution, job step processing stops and an error is raised.

SQLDMOJobStepAction_/QuitWithSuccess

1

On successful execution of the step, job step processing stops and success is reported.

SQLDMOJobStepAction_/Unknown

0

The value is not valid.