• ms sql server 2012 维护计划任务无法删除怎么解决?
    ms sql server 2012 维护计划任务无法删除怎么解决?
  • 提问者:
    zhengxiuyun
      | 浏览次数310次
    2016/9/29 18:42:37
解决答案
 回复时间:2016/9/29 18:50:29

经求证

      打开企业管理器-新建查询

      1、找出任务ID   

         use msdb

         select * from sysmaintplan_plans
         select * from sysmaintplan_log
         select * from sysmaintplan_subplans

         假如要删除的维护计划任务ID 是:32A213BE-FF42-421B-ABE7-94D4BDF496A7

       2、删除维护计划任务ID

        use msdb
        delete from sysmaintplan_log where plan_id = 32A213BE-FF42-421B-ABE7-94D4BDF496A7
        delete from sysmaintplan_subplans where subplan_id = 32A213BE-FF42-421B-ABE7-94D4BDF496A7
        delete from sysmaintplan_plans where id = 32A213BE-FF42-421B-ABE7-94D4BDF496A7