SqlServer中维护计划无法删除的解决方法
之前碰到过自己新建的SqlServer维护计划想要删除时删不掉的问题,搜索了半天也没找到解决方法,几乎没有相应的帖子。最后在国外的网站上找到了方法,发现很好用,在这里和大家分享一下免得以后不好找。
代码1. 先执行下面的语句将维护计划的ID查出。
select * from sysmaintplan_plans
2. 将查出的ID填入到下面几句话中的''中,并执行。
delete from sysmaintplan_log where plan_id = ''
delete from sysmaintplan_subplans where plan_id = ''
delete from sysmaintplan_plans where id = ''
3. 在Sql Agent中删除相应的Job(维护计划会自动建立相应的Job).
select * from sysmaintplan_plans
2. 将查出的ID填入到下面几句话中的''中,并执行。
delete from sysmaintplan_log where plan_id = ''
delete from sysmaintplan_subplans where plan_id = ''
delete from sysmaintplan_plans where id = ''
3. 在Sql Agent中删除相应的Job(维护计划会自动建立相应的Job).

浙公网安备 33010602011771号