Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 3.03 KB

sp-delete-jobstep-elastic-jobs-transact-sql.md

File metadata and controls

72 lines (47 loc) · 3.03 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic dev_langs monikerRange
jobs.sp_delete_jobstep (Azure Elastic Jobs) (Transact-SQL)
jobs.sp_delete_jobstep removes an existing job step from an existing job created for the Azure Elastic Jobs service for Azure SQL Database.
WilliamDAssafMSFT
wiassaf
randolphwest
08/21/2024
azure-sql-database
system-objects
reference
TSQL
=azuresqldb-current

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

[!INCLUDE 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 [!INCLUDE ssnoversion-md] for the [!INCLUDE ssnoversion-md] Agent service. For information about the [!INCLUDE ssnoversion-md] Agent version, see sp_delete_jobstep.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: 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.

Related content