November 15, 2012 at 5:07 pm
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!
November 15, 2012 at 9:38 pm
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.
November 16, 2012 at 5:01 am
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
November 16, 2012 at 5:07 am
sorry, a problem with my browser generated a double post
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply