OnSuccessStep Property (SQL-DMO)

The OnSuccessStep property identifies the SQL Server Agent job step executed after the success of the referenced step.

Applies To

JobStep Object

Syntax

object.OnSuccessStep [= value]

Part Description
object Expression that evaluates to an object in the Applies To list
value Long integer specifying a job step by ordinal number

Remarks

On success of a job step, SQL Server Agent can terminate the job (reporting success or failure) or, if the job has more than a single step, can attempt to execute the next step or another step in the job.

To direct job success logic to a specific step

  1. Set OnSuccessStep to indicate the job step that should execute.
  2. Set the OnSuccessAction property to SQLDMOJobStepAction_GotoStep.
Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetOnSuccessStep(LPLONG pRetVal);

HRESULT SetOnSuccessStep(long NewValue);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.