Today I ran into an interesting problem. I wanted to delete a Maintenance Plan on a server that had SQL Server reinstalled without SSIS (Integration Services). (I was not responsible for this reinstallation...).
I did not know that yet when I wanted to delete the Maintenance Plan. So I followed the menu (right-click the Maintenance Plan and select Modify) and I got this error:

The error message in plain text for the search engines:
Exception has been thrown by the target of an invocation. (mscorlib)
Additional information:
An Integration Services class cannot be found. Make sure that Integration Services is correctly installed on the computer that is running the application. Also, make sure that the 64-bit version of Integration Services is installed if you are running a 64-bit application.
Class not registered.
T-SQL
I then searched for and found the T-SQL code for deleting the Maintenance Plan manually:
/* Delete a Maintenance Plan manually.
Works in SQL Server 2005 and SQL Server 2008. */
--To get the Maintenance Plan IDs:
USE msdb
GO
SELECT * FROM sysmaintplan_plans
GO
USE msdb
GO
DECLARE @varID varchar(100)
--Paste the ID of the Maintenance Plan you want to delete below
SET @varID ='E13A5028-A35C-43BE-96C0-46B436CCDBB5'
DELETE FROM sysmaintplan_log WHERE plan_id = @varID
DELETE FROM sysmaintplan_subplans WHERE plan_id = @varID
DELETE FROM sysmaintplan_plans WHERE id = @varID
GO
References
I found the code in this thread: http://www.eggheadcafe.com/software/aspnet/33774157/cannot-delete-maintenance-plan-or-scheduled-job.aspx.
posted @ Wednesday, September 15, 2010 2:08 PM