删除作业计划出错(DELETE语句与 REFERENCE约束"FK_subplan_job_id"冲突。)

删除作业计划出错
提示:DELETE语句与 REFERENCE约束"FK_subplan_job_id"冲突。
 
解决方案:
 
--打开SQL查询,
use msdb
select * from  sysmaintplan_plans --查看作业ID
delete from dbo.sysmaintplan_log where plan_id =作业ID
delete from sysmaintplan_subplans where plan_id =作业ID
DELETE FROM sysmaintplan_plans WHERE [ID]=作业ID
--然后再到SQL SERVER 代理-----作业----即可删除
 

你可能感兴趣的:(delete,sql查询,冲突,reference)