Solved

Cannot delete or run SQL Maintenance Plans from SQL Management Studio

Posted on 2008-10-14
11
1,389 Views
Last Modified: 2012-05-05
I hope this is somewhat clear. Recent deployment of SQL Server 2008 Standard on a Windows 2003 Server. All mandatory service packs and hotfixes have been applied.

I have 2 issues:

1.      Deleting the initial maintenance plan that was created via the wizard from SSMS to backup the databases.

The error message is:

Exception has been thrown by the target of an invocation. (mscorlib)

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

Ive seen where some can overcome this by deleting the faulty plan id record in the sysmaintplan_subplans, sysmaintplan_log and the sysdtspackages tables. These tables are empty.

Subsequent maintenance plans can be created and deleted. However the original maintenance plan remains and the job cannot be deleted once a second Maintenance Plan is deleted. The job is displayed under SQL Server Agent | Jobs. If you attempt to delete the job from SSMS, a message is displayed that the job does not exist.

2.      Any Maintenance Plan created fails to execute successfully.

The error message is:

Execution failed. See the maintenance plan and SQL Server Agent job history logs for details.

Additional information:
      Job jobname.Subplan_1 failed (SqlManagerUI)

The job history log only states the job failed and the last step to run was step 1 (subplan_1).

This message occurs for any Maintenance Plan job defined.

Any guidance would be appreciated. Thank you.
0
Comment
Question by:DrewBryant1961
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 1

Expert Comment

by:Soccerman55
ID: 22811208
This was the solution in SQL 2005, I would assume it would be pretty close to the same for SQL 2008

Execute these in the MSDB database
SELECT * FROM sysdtspackages90 (to get the Plan_ID of the Bad Plan)
DELETE FROM sysmaintplan_log WHERE plan_id = BadPlanID
DELETE FROM sysmaintplan_subplans WHERE plan_id = BadPlanID
DELETE FROM sysdtspackages90 WHERE plan_id = BadPlanID

After doing this, the plan goes away by itself, and the associated job can be deleted w/o error.
0
 

Author Comment

by:DrewBryant1961
ID: 22813949
Thanks for your reply. I saw that, however there is not a sysdtspackages90 table. I removed the entry in the sysdtspackages table. The other sysmaintplan tables have nothing in them.

The job went away although the original maintenance plan remains and cannot be deleted.

Any new maintenance plans created from the wizard will not execute successfully although new plans can be created and deleted.

0
 
LVL 1

Expert Comment

by:radersolutions
ID: 22924773
I'm having the same issue #2 here, on Server 2008 x64 with SQL 2008. Any ideas?
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 51

Expert Comment

by:Mark Wills
ID: 22927339
Have you looked through the sysjobs tables ?
0
 
LVL 1

Expert Comment

by:radersolutions
ID: 22930770
I just took a look, and didn't see anything useful. The jobs that were created by log shipping work fine, but the maintanance plan jobs fail every time. The only text available says that they failed, with no reason.
I get lines like this:
The job failed.  The Job was invoked by User MYDOMAIN\Administrator.  The last step to run was step 1 (backup_all_DBs).
0
 
LVL 1

Accepted Solution

by:
radersolutions earned 500 total points
ID: 22930931
I did some more googling, and I've figured it out:

I wasn't aware that SQL Server Integration Services was required for Maintanance Plans to work. Installed SSIS, and then they started working.

thanks!
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 22931012
About to suggest exactly that - well, first to see if 2005 was still installed, then uninstall (via control panel) and re-install SSIS for 2008 / VS...

Beat me by seconds... Was typing up when your e-mail notice came in.
0
 
LVL 1

Expert Comment

by:radersolutions
ID: 22931107
hehe.. Thanks for your help though. Your first comment got me to thinking that there was definitely something missing based on the fact that the error messages didn't have any real "errors" in them, like something was missing.

This is a fresh installation of 2008, no 2005 pre-existing.
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 22931801
Pleased you are OK, but what about : DrewBryant1961 ?
0
 

Author Comment

by:DrewBryant1961
ID: 22934474
Installed SQL Server Integration Services and new maintenance plans run fine.

The original plan will not run and cannot be deleted. I get the same exception error listed in issue 1 above.

This was a new install of SQL 2008 and I, too, wasn't aware that SQL Server Integration Services was required for Maintenance Plans to work.

Thanks for your replies.
0
 

Author Closing Comment

by:DrewBryant1961
ID: 31506168
Thanks for your help.
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Whats wrong in this query - Select * from tableA,tableA 11 53
SQL DATEADD 10 81
sql query help 15 54
SQL - Curser to do an insert based on a select 2 26
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question