This documentation is archived and is not being maintained.

StepCompletionAction Enumeration

The StepCompletionAction enumeration contains values that specify the action taken on completion of a job step.

Namespace: Microsoft.SqlServer.Management.Smo.Agent
Assembly: Microsoft.SqlServer.SqlEnum (in microsoft.sqlserver.sqlenum.dll)

public enum StepCompletionAction
public enum StepCompletionAction
public enum StepCompletionAction

Member nameDescription
GoToNextStepWhen the referenced job step completes the next job step is executed.
GoToStepWhen the referenced job step completes the specified job step is executed.
QuitWithFailureWhen the referenced job step completes the job completes execution with a status of failure.
QuitWithSuccessWhen the referenced job step completes the job completes execution with a status of success.

Updated text:

If your job is designed so that after performing one job step successfully it moves on to perform the next job step in the sequence, you should set OnSuccessAction to GoToNextStep. However, if you want to jump to a job step that is out of sequence, you will have to use GoToStep, and then specify which job step number to jump to. For example, if a job step fails, you might want to jump to another job step to manage the failure. To do this, set the OnFailAction to GoToStep, and then set the OnFailStep to the integer value that matches the ID property of the JobStep.

The StepCompletionAction enumeration class is served by the OnSuccessAction property and the OnFailAction property.

This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.


Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Release

History

New content:
  • Added text to the Remarks section that explains how to use the StepCompletionAction enumeration to control the flow of execution through job steps.

Show: