Job step action constants specify simple logic for SQL Server Agent jobs. With 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, continue execution at next defined step. |
| SQLDMOJobStepAction_ GotoStep |
4 | Job step execution continues at specified step. When OnSuccessAction is SQLDMOJobStepAction_ GotoStep, use the OnSuccessStep property to specify the next-executed step. When OnFailAction is SQLDMOJobStepAction_ GotoStep, use the OnFailStep property to specify the next-executed step. |
| SQLDMOJobStepAction_ QuitWithFailure |
2 | Default for OnFailAction property. On failed execution, terminate job step processing and raise an error. |
| SQLDMOJobStepAction_ QuitWithSuccess |
1 | On successful execution of the step, terminate job step processing and report success |
| SQLDMOJobStepAction_Unknown | 0 | Bad or invalid value. |
| OnFailAction Property | OnSuccessAction Property |