Microsoft Knowledge Base Email Alertz

KBAlertz.com: If any task in a Database Maintenance plan fails or encounters an error message, the maintenance plan job itself may show as failed. The Job History Details shows the following error message: sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step failed. However, this does not necessarily

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 288577 - Last Review: December 20, 2005 - Revision: 4.3

How to troubleshoot problems that occur when you use a Database Maintenance plan in SQL Server

This article was previously published under Q288577

SUMMARY

If any task in a Database Maintenance plan fails or encounters an error message, the maintenance plan job itself may show as failed. The Job History Details shows the following error message:
sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step failed.
However, this does not necessarily indicate that the Maintenance Plan as a whole has failed. The Maintenance Plan job shows a status of failed in order to raise a flag to the user that a task in the maintenance plan requires attention.

This kind of behavior is normal because errors may be encountered that need user intervention to work through. Any time a maintenance plan job fails, you must check the plan history to see what the failure is and then take the appropriate action to resolve the problem.

MORE INFORMATION

To identify the specific task and error message about why the job failed, you need to check the Database Maintenance Plan History. The Database Maintenance Plan History is where you can obtain detailed information about each task that is being performed by the maintenance plan. Use these steps to locate the information in the SQL Server Enterprise Manager:
  1. Navigate to and then expand Database Maintenance Plans.
  2. Right-click the Database Maintenance Plan for which the corresponding job failed.
  3. Click Database Maintenance Plan History.
  4. A window opens that contains details about each task performed in the Maintenance Plan. A historical list is provided for each task run on each date, which also indicates the failure or success status of the individual task. If you double-click a failed task, information displays indicating any error messages that occurred along with information about why the task failed.
  5. Take the necessary steps at this point to resolve the specific issue indicated.
A typical example is a Maintenance Plan that is set up to backup databases and to check integrity. For example, assume that one of the integrity check tasks encounters data integrity errors in one or more databases. The task raises an error message. The Maintenance Plan continues with the rest of the tasks in the plan. When the Maintenance Plan completes, the corresponding job in SQLAgent is set to a status of "failed". A review of the Maintenance Plan History indicates which database integrity check found integrity errors or failed and the corresponding error messages. You then need to take action and run the appropriate DBCC CHECKDB steps to resolve the issue. For more information about DBCC CHECKDB, see the "DBCC CHECKDB" topic in SQL Server Books Online.

You can also have detailed Maintenance Plan information written to a file. To have detailed Maintenance Plan information written to a file, use these steps:
  1. In SQL Server Enterprise Manager, navigate to the Database Maintenance Plans. Select and then double-click the plan you want.
  2. Click the Reporting tab. In the Reporting dialog box, you can choose to write a report to a text file in a specified directory. The report contains details of the steps executed by the maintenance plan, and includes any error information. You can also have this report e-mailed to a specified operator for regular checking.
  3. Instead of a text report, you can direct the output to a SQL Server table with the History on this server option.

    For more information about the details of setting these options for a Database Maintenance Plan, see the "Database Maintenance Plan, Reporting Tab" topic in SQL Server Books Online.
If you need more in-depth troubleshooting, you can start SQL Server Agent to run from the command prompt with verbose logging.

Default instance:
sqlagent.exe -c -v
Named instance:
sqlagent.exe -i[Instance] -c -v

APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Workgroup Edition
Keywords: 
kbinfo KB288577
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please