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 |
|
=azuresqldb-current |
[!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
[jobs].sp_delete_job
[ @job_name = ] N'job_name'
[ , [ @force = ] force ]
[ ; ]
The name of the job to be deleted. @job_name is nvarchar(128), with a default of NULL
.
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.
0
(success) or 1
(failure).
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).
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.