简体   繁体   中英

SQL Maintenance Plan - Determining Duration of Steps

I'm trying to keep a maintenance plan under 30 minutes. The duration of each step indicates this should be the case, but the plan is running over 1 hour.

The check database integrity ends at 20:04:16 and the next step, update statistics starts at 21:00:30. What is going on during this gap, and which step is causing the issue?

Maintenance Plan: GP Nightly Full Maintenance Duration: 01:06:33 Status: Succeeded.

Back Up Database (Full) (ISTAGPSQL1) Backup Database on Local server connection Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped. Databases: All user databases Type: Full Append existing Task start: 2020-10-13T20:00:02. Task end: 2020-10-13T20:01:27. Success

Check Database Integrity (ISTAGPSQL1) Check Database integrity on Local server connection Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped. Databases: All user databases Include indexes Physical only Task start: 2020-10-13T20:01:27. Task end: 2020-10-13T20:04:16. Success

Update Statistics (ISTAGPSQL1) Update Statistics on Local server connection Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped. Databases: All user databases Object: Tables and views All existing statistics Task start: 2020-10-13T21:00:30. Task end: 2020-10-13T21:06:32. Success

Clean Up History (ISTAGPSQL1) Cleanup history on Local server connection History type: Backup,Job,Maintenance Plan Age: Older than 4 Weeks Task start: 2020-10-13T21:06:33. Task end: 2020-10-13T21:06:35. Success

Maintenance Cleanup Task (ISTAGPSQL1) Maintenance Cleanup on Local server connection Cleanup Database Backup files Age: Older than 4 Weeks Task start: 2020-10-13T21:06:35. Task end: 2020-10-13T21:06:35. Success

Sorry if you've already checked this - but given that the 'Update statistics' component starts at a few seconds after 9:00pm, my guess is that you have sub-plans that are on different schedules eg, the first sub-plan starts at 8:00pm while the second sub-plan starts at 9:00pm. Try looking in the SQL Server agent to review when they're scheduled.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM