下面是网上找的一些资料来解决这个问题:
先获取这个job_id:
USE [msdb]
GO
/****** Object: Job [dbbackup_diff.Subplan_1] Script Date: 04/08/2015 10:22:46 ******/
EXEC msdb.dbo.sp_delete_job @job_id=N‘588acfb8-630b-41c3-aa47-90d3671bda90‘, @delete_unused_schedule=1
GO
根据job_id到subplan_id:
select subplan_id FROM msdb.dbo.sysmaintplan_subplans where job_id=‘588acfb8-630b-41c3-aa47-90d3671bda90‘
subplan_id
FE56B397-4704-4AA7-BE49-767C1574E7D0
从系统表msdb.dbo.sysmaintplan_log和msdb.dbo.sysmaintplan_subplans中分别删除subplan_id为‘FE56B397-4704-4AA7-BE49-767C1574E7D0’的记录:
delete from msdb.dbo.sysmaintplan_log where subplan_id=‘FE56B397-4704-4AA7-BE49-767C1574E7D0‘
delete FROM msdb.dbo.sysmaintplan_subplans WHERE SUBPLAN_ID=‘FE56B397-4704-4AA7-BE49-767C1574E7D0‘
再次回到图形界面再删除job就不会报错了。
参考:
http://www.cnblogs.com/kerrycode/p/3852231.html
时间: 2024-10-10 06:20:34