November 5, 2009 at 2:17 pm
Hi all,
I'm having trouble deleting my 'maintenance plans'. I get the following error:
Exeption has been thrown by the target of an invocation. (mscorlib)
Additional information:
An error was encountered when trying to remove the package "Maintenance Plans\backup" from SQL Server.
An error was encountered when trying to remove the package "Maintenance Plans\backup" from SQL Server.
I am using MS SQL 2005 SP3, running MS Server 2003 SP2.
Note: I have renamed the Server name, but I have read on other discussion forums that SQL would automatically detect the change and "fix itself". I have checked the connection properties and the server name under "Product" and "Server Environment" is correct there.
---
I have attempted the following:
Re-register the dts.dll file. On the server, open a command prompt and type: regsvr32 dts.dll
Any help would be appreciated. Thanks
November 5, 2009 at 7:46 pm
Since right-click -> delete...did not work, I ran these three simple steps, that I found on the Internet and it solved my problem.
Step 1:
Execute the below query to obtain the Maintenance plan name and Id
SELECT NAME, ID FROM MSDB..SYSMAINTPLAN_PLANS
Step 2:
Replace the Id obtained from Step 1 into the below query and delete the entry from log table
DELETE FROM SYSMAINTPLAN_LOG WHERE PLAN_ID=' '
Step 3:
Replace the Id obtained from Step 1 into the below query and delete the entry from subplans table as shown below,
DELETE FROM SYSMAINTPLAN_SUBPLANS WHERE PLAN_ID = ' '
Step 4:
Finally delete the maintenance plan using the below query where ID is obtained from Step1
DELETE FROM SYSMAINTPLAN_PLANS WHERE ID = ' '
NOTE: Run it in msdb system database!
November 6, 2009 at 5:22 am
thanks for posting solution back grustni.
moving msdb to a different server\renaming server has become a minefield since SQL2005. Let us know if you hit any other related problems.
---------------------------------------------------------------------
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply