Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 2.71 KB

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

File metadata and controls

65 lines (44 loc) · 2.71 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic dev_langs monikerRange
jobs.sp_delete_job (Azure Elastic Jobs) (Transact-SQL)
jobs.sp_delete_job updates a 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_job (Azure Elastic Jobs) (Transact-SQL)

[!INCLUDE Azure SQL Database]

Deletes an existing job in the Azure Elastic Jobs service for Azure SQL Database.

This stored procedure shares the name of sp_delete_job 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_job.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

[jobs].sp_delete_job
    [ @job_name = ] N'job_name'
    [ , [ @force = ] force ]
[ ; ]

Arguments

[ @job_name = ] N'job_name'

The name of the job to be deleted. @job_name is nvarchar(128), with a default of NULL.

[ @force = ] force

Forces the job to be deleted. @force is bit.

  • When 1, forces the job to be deleted, even if executions are currently in progress, canceling any executions currently in progress.
  • When 0, fails if any job executions are in progress.

Return code values

0 (success) or 1 (failure).

Remarks

Job history is automatically deleted when a job is deleted.

To remove only a single job step from an existing job, use jobs.sp_delete_jobstep (Azure Elastic Jobs).

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 owned by other users.

Related content