Removes a job step from a job.
sp_delete_jobstep [@job_id =] job_id, | [@job_name =] 'job_name',
[@step_id =] step_id
Note Either job_id or job_name must be specified, but both cannot be specified.
0 (success) or 1 (failure)
None
Removing a job step automatically updates the other job steps that reference the deleted step.
For information about the steps associated with a particular job, run sp_help_jobstep.
SQL Server Enterprise Manager provides an easy, graphical way to manage jobs, and is the recommended way to create and manage the job infrastructure.
Execute permissions default to the public role.
This example removes job step 1 from the job Nightly Backups.
USE msdb
EXEC sp_delete_jobstep @job_name = 'Nightly Backups',
@step_id = 1
Modifying and Viewing Jobs | sp_update_jobstep |
sp_add_jobstep | System Stored Procedures |
sp_help_jobstep |