views:

55

answers:

1

Hi,

Here is an export of our sql 2005 maintenance plan history

Date,Source,Severity,Plan Name,SubPlan Name,Task Name,Duration
06/07/2009 05:08:29,,Unknown,Weekly optimisation,Subplan_1,,05:08:25
06/07/2009 05:07:41,,Unknown,,,Shrink Database Task (localhost),00:00:48
06/07/2009 04:50:40,,Unknown,,,Rebuild Index Task (localhost),00:16:41
06/07/2009 00:00:37,,Unknown,,,Purge DataStoreException (localhost),00:01:08
06/07/2009 00:00:37,,Unknown,,,Truncate HelpDeskMonitoring (localhost),00:00:07
06/07/2009 00:00:37,,Unknown,,,Execute SQL Server Agent Job Task (localhost),00:00:00
06/07/2009 00:00:05,,Unknown,,,Back Up Database Task (localhost),00:00:32

Why the duration of each steps is fast, but the overall maintenance has taken 5h ? How can I find which task is taking that amount of time...

A: 

Look at the start times and you will see that Purge DataStoreException Started at :37 and the next step started at 5:07.

This is not a standard SQL maintenance task, but something custom you have inserted, correct?

What is it doing?

Sam
It loops threw all our databases (+/- 250) and truncate a specific table.Why the duration column of this step indicates 00:01:08 instead of 04:48:13?
Sebastien
I couldn't tell you why the logs show what they do. Maybe they are right. I'd try running that truncate step on its own one night. Has this become an issue lately, or has it always run this long?
Sam
I will try to isolate this steps to see.But the plan as been taken more and more time since 1 month or so, but the number of database as almost doubled too.I guess your anwser will be right, the purge steps may be the steps that is taking so long...
Sebastien