RemoveAllJobSteps Method (SQL-DMO)

The RemoveAllJobSteps method removes all system records maintaining steps executed by the referenced SQL Server Agent job..

Applies To

Job Object

Syntax

object.RemoveAllJobSteps( )

Part Description
object Expression that evaluates to an object in the Applies To list

Remarks

A SQL Server Agent job is enabled when it has at least one step and an execution target. Successful execution of the RemoveAllJobSteps method disables the SQL Server Agent job referenced, and SQL-DMO empties the JobSteps collection of the Job object used. To re-enable the referenced job by using SQL-DMO, create JobStep objects and add them to the JobSteps collection of the Job object. For more information, see JobStep Object.

Prototype (C/C++)

HRESULT RemoveAllJobSteps();

  


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