Deletes a job.
sp_delete_job [@job_id =] job_id | [@job_name =] 'job_name'
[, [@originating_server =] 'server']
Note Either job_id or job_name must be specified, but both cannot be specified.
0 (success) or 1 (failure)
None
Two parameters, @delete_history and @originating_server, exist in sp_delete_job, but are reserved for internal use.
SQL Server Enterprise Manager provides an easy, graphical way to manage jobs, and is the recommended way to create and manage the job infrastructure.
Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_delete_job.
This example deletes the job Nightly Backups.
USE msdb
EXEC sp_delete_job @job_name ='Nightly Backups'
sp_add_job | sp_update_job |
sp_help_job | System Stored Procedures |