I've a Multi step Maintenance plan of 5 steps called "Reindex". This automatically created an Agent job called "Reindex..Subplan_1"
There's an email alert on failure of the Agent job.
Is there any place in maintenance task design to put an alert in or do I always have to use add the alert to Agent task it created.
Maintenance plan History:
The plan history job shows success
The log file created shows 4 out of the 5 steps. No Error message in the logfile.
I know the last, 5th step (update statistics) is missing so I know update statistics failed.
SQL Agent History:
I got an Email Alert of failure. Email just says subplan1 failed.
If I look at the Reindex..Subplan_1 in the SQL Agent jobs it does shows an error happened.
But lists the output of Step one 1 (not the failed step 5 ) guess its because msdb.dbo.sysjobhistory.message is 4000 chars max. There is no space to show the error.
How do I get it to log the error, so next time it happens I know what it is.
More a question about logging than a specific failure. Is this because all my 5 tasks in the maintenance plan are in the same subtask?