[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
Maintenance Plan Job Failed

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

Maintenance Plan Job Failed.


Applies to: Microsoft SQL Server 2005 Developer Edition SP4.
 

Problem Description.
 

We had a maintenance plan running successfully on a server for months, and all of a sudden it started to fail. The maintenance plan was created to schedule a rebuild of indexes and update statistics.

On examining the history of the maintenance plan job, we found it failed while rebuilding indexes as shown below.


The job outcome was the following:

Date 4/10/2012 10:51:21 AM
Log Job History (MaintenancePlan - Monday.Monday)

Step ID 0
Server SERVERDB
Job Name MaintenancePlan - Monday.Monday
Step Name (Job outcome)
Duration 00:05:34
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
The job failed. The Job was invoked by User Domain\user. The last step to run was step 1 (Monday).


The outcome of step 1 was the following:

Date 4/10/2012 10:51:21 AM
Log Job History (MaintenancePlan - Monday.Monday)

Step ID 1
Server SERVERDB
Job Name MaintenancePlan - Monday.Monday
Step Name Monday
Duration 00:05:34
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
Executed as user: DOMAIN\windowsaccount. ...12-04-10 10:51:52.17 Source: Rebuild Index Task Executing query "USE [database] ".: 10% complete End Progress Progress: 2012-04-10 10:51:52.86 Source: Rebuild Index Task Executing query "ALTER INDEX [PK_AssetInventoryItem_1] ON [dbo].[As".: 11% complete End Progress Progress: 2012-04-10 10:51:52.86 Source: Rebuild Index Task Executing query "USE [database] ".: 11% complete End Progress Progress: 2012-04-10 10:51:52.86 Source: Rebuild Index Task Executing query "ALTER INDEX [AssetLicenseOverride_UniqueKey] ON [d".: 11% complete End Progress Progress: 2012-04-10 10:51:52.86 Source: Rebuild Index Task Executing query "USE [database] ".: 11% complete End Progress Progress: 2012-04-10 10:51:52.87 Source: Rebuild Index Task Executing query "ALTER INDEX [IX_AssetRecord] ON [dbo].[AssetRecord".: 12% complete End Progress Progress: 2012-04-10 10:51:52.87 ... The package execution fa... The step failed.



Cause.


The maintenance plan job started to fail after a database was put offline. We modified the maintenance plan to not include that database but the job kept failing.


Workaround.

Put the database online again or detach it, and the job will execute successfully.
 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.