Επεξεργασία

Κοινή χρήση μέσω


jobs.sp_delete_jobstep (Azure Elastic Jobs) (Transact-SQL)

Applies to: Azure SQL Database

Removes an existing job step from an existing job in the Azure Elastic Jobs service for Azure SQL Database.

This stored procedure shares the name of sp_delete_jobstep with a similar object in SQL Server for the SQL Server Agent service. For information about the SQL Server Agent version, see sp_delete_jobstep.

Transact-SQL syntax conventions

Syntax

[jobs].sp_delete_jobstep [ @job_name = ] 'job_name'
     [ , [ @step_id = ] step_id ]
     [ , [ @step_name = ] 'step_name' ]
     [ , [ @job_version = ] job_version OUTPUT ]

Arguments

@job_name

The name of the job from which to remove the step. job_name is nvarchar(128), with no default.

@step_id

The identification number for the job step to be deleted. Either step_id or step_name must be specified. step_id is an int.

@step_name

The name of the step to be deleted. Either step_id or step_name must be specified. step_name is nvarchar(128).

@job_version OUTPUT

Output parameter assigned the new job version number. job_version is int.

Return code values

0 (success) or 1 (failure).

Remarks

To remove an entire job, use jobs.sp_delete_job (Azure Elastic Jobs).

Any in-progress executions of the job aren't affected.

The other job steps are automatically renumbered to fill the gap left by the deleted job step.

Permissions

By default, members of the sysadmin fixed server role can execute this stored procedure. Only members of sysadmin can use this stored procedure to edit the attributes of jobs that are owned by other users.