StepCompletionAction 列舉型別
The StepCompletionAction enumeration contains values that specify the action taken on completion of a job step.
命名空間: Microsoft.SqlServer.Management.Smo.Agent
組件: Microsoft.SqlServer.SqlEnum (在 Microsoft.SqlServer.SqlEnum.dll 中)
語法
'宣告
Public Enumeration StepCompletionAction
'用途
Dim instance As StepCompletionAction
public enum StepCompletionAction
public enum class StepCompletionAction
type StepCompletionAction
public enum StepCompletionAction
成員
成員名稱 | 描述 | |
---|---|---|
QuitWithSuccess | When the referenced job step completes the job completes execution with a status of success. | |
QuitWithFailure | When the referenced job step completes the job completes execution with a status of failure. | |
GoToNextStep | When the referenced job step completes the next job step is executed. | |
GoToStep | When the referenced job step completes the specified job step is executed. |
備註
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. If you want to jump to a job step that is out of sequence, you will have to use [F:Microsoft.SqlServer.Management.Smo.Agent.StepCompletionAction.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.