Sunday, March 25, 2012

Can not delete Agent Jobs

Seems that someone deleted the maintenace jobs and now I can not delete any
of the jobs associated with them. I get error:
TITLE: Microsoft SQL Server Management Studio
--
Attempt to retrieve data for object failed for Server 'IMPULSE-BPB'.
(Microsoft.SqlServer.Smo)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attempt+to+retrieve+data+for+object+Server&LinkId=20476
--
ADDITIONAL INFORMATION:
The Job 'BP WSS Database Job.DB Backup Job for DB Maintenance Plan 'BP WSS
Database Job'' does not exist on the server. (Microsoft.SqlServer.Smo)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.ObjectDoesNotExist&LinkId=20476
--
BUTTONS:
OK
--
Any Idea's?
ThanksClick on the Jobs node in SSMS and click Refresh.
You know, sometimes items are not refreshed automatically in SSMS (and EM of
course) and you see that Maintenance tasks are deleted but jobs are still
there but they are not actually. So you are trying to delete the deleted
stuff. I've seen this situation lots of times and I thought this could be
your situation.
--
Ekrem Ã?nsoy
"RickSpicknall" <RickSpicknall@.discussions.microsoft.com> wrote in message
news:8A0F2AF9-A5EC-4052-A162-99C94ABD5C96@.microsoft.com...
> Seems that someone deleted the maintenace jobs and now I can not delete
> any
> of the jobs associated with them. I get error:
> TITLE: Microsoft SQL Server Management Studio
> --
> Attempt to retrieve data for object failed for Server 'IMPULSE-BPB'.
> (Microsoft.SqlServer.Smo)
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attempt+to+retrieve+data+for+object+Server&LinkId=20476
> --
> ADDITIONAL INFORMATION:
> The Job 'BP WSS Database Job.DB Backup Job for DB Maintenance Plan 'BP WSS
> Database Job'' does not exist on the server. (Microsoft.SqlServer.Smo)
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.ObjectDoesNotExist&LinkId=20476
> --
> BUTTONS:
> OK
> --
> Any Idea's?
> Thanks|||Geez whiz, Now I feel dumb. Thanks However I still have one out there I
can not get rid of. I get error:
The DELETE statement conflicted 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. (.Net SqlClient Data Provider)
"Ekrem Ã?nsoy" wrote:
> Click on the Jobs node in SSMS and click Refresh.
> You know, sometimes items are not refreshed automatically in SSMS (and EM of
> course) and you see that Maintenance tasks are deleted but jobs are still
> there but they are not actually. So you are trying to delete the deleted
> stuff. I've seen this situation lots of times and I thought this could be
> your situation.
> --
> Ekrem Ã?nsoy
>
> "RickSpicknall" <RickSpicknall@.discussions.microsoft.com> wrote in message
> news:8A0F2AF9-A5EC-4052-A162-99C94ABD5C96@.microsoft.com...
> > Seems that someone deleted the maintenace jobs and now I can not delete
> > any
> > of the jobs associated with them. I get error:
> >
> > TITLE: Microsoft SQL Server Management Studio
> > --
> >
> > Attempt to retrieve data for object failed for Server 'IMPULSE-BPB'.
> > (Microsoft.SqlServer.Smo)
> >
> > For help, click:
> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attempt+to+retrieve+data+for+object+Server&LinkId=20476
> >
> > --
> > ADDITIONAL INFORMATION:
> >
> > The Job 'BP WSS Database Job.DB Backup Job for DB Maintenance Plan 'BP WSS
> > Database Job'' does not exist on the server. (Microsoft.SqlServer.Smo)
> >
> > For help, click:
> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.ObjectDoesNotExist&LinkId=20476
> >
> > --
> > BUTTONS:
> >
> > OK
> > --
> >
> > Any Idea's?
> > Thanks
>|||Hi Rick!
There is a Foreign Key constraint there.
Try this:
USE MSDB
SELECT * FROM dbo.sysmaintplan_subplans
Find your plan_id and then
DELETE FROM dbo.sysmaintplan_log WHERE plan_id = 'plan_id '
EXECUTE sp_delete_maintenance_plan 'plan_id '
Ekrem Ã?nsoy
"RickSpicknall" <RickSpicknall@.discussions.microsoft.com> wrote in message
news:F7029524-ACA4-4F62-85F7-18D5EB924F46@.microsoft.com...
> Geez whiz, Now I feel dumb. Thanks However I still have one out there I
> can not get rid of. I get error:
> The DELETE statement conflicted 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. (.Net SqlClient Data Provider)
> "Ekrem Ã?nsoy" wrote:
>> Click on the Jobs node in SSMS and click Refresh.
>> You know, sometimes items are not refreshed automatically in SSMS (and EM
>> of
>> course) and you see that Maintenance tasks are deleted but jobs are still
>> there but they are not actually. So you are trying to delete the deleted
>> stuff. I've seen this situation lots of times and I thought this could be
>> your situation.
>> --
>> Ekrem Ã?nsoy
>>
>> "RickSpicknall" <RickSpicknall@.discussions.microsoft.com> wrote in
>> message
>> news:8A0F2AF9-A5EC-4052-A162-99C94ABD5C96@.microsoft.com...
>> > Seems that someone deleted the maintenace jobs and now I can not delete
>> > any
>> > of the jobs associated with them. I get error:
>> >
>> > TITLE: Microsoft SQL Server Management Studio
>> > --
>> >
>> > Attempt to retrieve data for object failed for Server 'IMPULSE-BPB'.
>> > (Microsoft.SqlServer.Smo)
>> >
>> > For help, click:
>> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attempt+to+retrieve+data+for+object+Server&LinkId=20476
>> >
>> > --
>> > ADDITIONAL INFORMATION:
>> >
>> > The Job 'BP WSS Database Job.DB Backup Job for DB Maintenance Plan 'BP
>> > WSS
>> > Database Job'' does not exist on the server. (Microsoft.SqlServer.Smo)
>> >
>> > For help, click:
>> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.ObjectDoesNotExist&LinkId=20476
>> >
>> > --
>> > BUTTONS:
>> >
>> > OK
>> > --
>> >
>> > Any Idea's?
>> > Thanks

No comments:

Post a Comment