sp_delete_jobstep (Transact-SQL)
Removes a job step from a job.
Removing a job step automatically updates the other job steps that reference the deleted step.
For more information about the steps associated with a particular job, run sp_help_jobstep.
Note |
|---|
Calling sp_delete_jobstep with a step_id value of zero deletes all job steps for the job. |
Microsoft SQL Server Management Studio provides an easy, graphical way to manage jobs, and is the recommended way to create and manage the job infrastructure.
By default, members of the sysadmin fixed server role can execute this stored procedure. Other users must be granted one of the following SQL Server Agent fixed database roles in the msdb database:
SQLAgentUserRole
SQLAgentReaderRole
SQLAgentOperatorRole
For details about the permissions of these roles, see SQL Server Agent Fixed Database Roles.
Only members of sysadmin can delete a job step that is owned by another user.

