Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic


SQL Server 2000

Removes a schedule from a job.


sp_delete_jobschedule [ @job_id = ] job_id , | [ @job_name = ] 'job_name' ,
    [ @name = ] 'sched_job_name'


[@job_id =] job_id

Is the identification number of the job from which to delete the schedule. job_id is uniqueidentifier, with a default of NULL.

[@job_name =] 'job_name'

Is the name of the job from which to delete the schedule. job_name is sysname, with a default of NULL.

Note  Either job_id or job_name must be specified; both cannot be specified.

[@name =] 'sched_job_name'

Is the name of the schedule to delete. sched_job_name is sysname, with no default.

Return Code Values

0 (success) or 1 (failure)

Result Sets



Removing a schedule from a job prevents Microsoft® SQLServerAgent from executing the job according to that schedule. sp_update_jobschedule can be used to disable a scheduled job without removing it from the schedule.

SQL Server Enterprise Manager provides an easy, graphical way to manage jobs, and is the recommended way to create and manage the job infrastructure.


Execute permissions default to the public role.


This example removes the Nightly Backup schedule from the Database Backup job.

USE msdb
EXEC sp_delete_jobschedule @job_name = N'Database Backup', 
   @name = N'Nightly Backup'

See Also

Modifying and Viewing Jobs




System Stored Procedures

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.