You should first delete Maintanence Plans then Jobs related to these plans
will be deleted automatically (of course I've seen some exceptions).
You get that error because the Job is already deleted after you deleted your
Maintanence Plan, so you are trying to delete an non-existing item. Refresh
that node so you'll see that that job is not there.
--
Ekrem Önsoy
"Greg" wrote in message
>I created a job to test the other day and now I want to delete/drop it.
>When
> I choose the Delete option from Management Studio I get the following
> error.
>
> Drop Failed for Job "Job Name"
> The DELETE statement confliched with the REFERENCE constraint
> "FK"subplan_job_id". The conflict occurred in database "msdb", table:
> "dbo.sysmaintplan_subplans", column: "job_id". The statement has been
> terminated.
>
> What I'm trying to do is delete any Jobs I've setup for testing that I no
> longer needs and to also delete any Maintenance Plans I no longer need.
> Neither my Job or my Maintenance Plans are referring to any other jobs or
> maintenance plans with them. Plus, they are very very basic items. All the
> job does is it runs a Maintenance Plan at a certain time. That's it. All
> the
> Maintenance Plan does is perform a backup of the database, that's it.
> Nothing
> fancy is going on here.
>
> After not being able to delete the Job, I went ahead and deleted the
> Maintenance Plan and now I get a different error for the Job. It states:
> Attempt to retreive data for object failed for Serverxxx failed. The Job
> "Backup Name" does not exists on the server.
>
> I don't quite understand what's going on here. All I simply want to be
> able
> to do is create some simple test maintenance plans and jobs and delete
> them
> when I'm done testing.
>
> Thanks,
>> Stay informed about: Dropping an Job