SQL AGENT JOB - Manually runnable only

  • Hello,

    I have this sql server agent job in sql server 2008 that runs every month.

    I want to make this job manually runnable only - basically remove the recursive schedule.

    How do I achieve this using TSQL?

    Thanks!

  • This is the process to remove the job from the schedule :

    1. Open Tree View in Object Explorer in SSMS.

    2. Open SQL Server Agent.

    3. Open Jobs under SQL Server Agent to view the jobs.

    4. Identify, Right Click on the job you want to remove from schedule and open Properties.

    5. On the left pane of the properties window.....click and select Schedules.

    6. All the schedules are then shown on the right pane. Select all the schedules and click Remove button on the bottom of the window to remove the job from all Schedules.

    After this you can run the job manually whenever you want and the job will not run recursively in a schedule.

    Hope this helps you.

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • And you can do this by using T-SQL:

    USE [msdb]

    GO

    EXEC msdb.dbo.sp_detach_schedule @job_name=N'name of the job', @schedule_name='name of schedule', @delete_unused_schedule=1

    GO

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • sorry, a problem with my browser generated a double post

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply