TechNet
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

sp_delete_jobschedule (Transact-SQL)

 

Updated: August 9, 2016

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Deletes a schedule for a job.

sp_delete_jobschedule is provided for backward compatibility only.

Job schedules can now be managed independently of jobs. To remove a schedule from a job, use sp_detach_schedule. To delete a schedule, use sp_delete_schedule.

NOTE:  sp_delete_jobschedule does not support schedules that are attached to multiple jobs. If an existing script calls sp_delete_jobschedule to remove a schedule that is attached to more than one job, the procedure returns an error.

By default, members of the sysadmin fixed server role can execute this stored procedure. Other users must be granted one of the following SQL Server Agent fixed database roles in the msdb database:

  • SQLAgentUserRole

  • SQLAgentReaderRole

  • SQLAgentOperatorRole

For details about the permissions of these roles, see SQL Server Agent Fixed Database Roles.

Members of the sysadmin role can delete any job schedule. Users who are not members of the sysadmin role can only delete job schedules that they own.

sp_delete_schedule (Transact-SQL)
sp_detach_schedule (Transact-SQL)
View or Modify Jobs
sp_add_schedule (Transact-SQL)
sp_help_jobschedule (Transact-SQL)
sp_update_jobschedule (Transact-SQL)
System Stored Procedures (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft