Creating SQL Server 2008 Maintenance Plans
Creating SQL Server 2008 Maintenance Plans
Many of the database maintenance operations covered in this white paper can be programmatically
applied through the implementation of SQL Server maintenance plans. Maintenance plans can both
automate and schedule essential tasks to protect your data. By using maintenance plans in SQL Server
2008 or SQL Server 2005, an administrator can schedule such operations as running database
consistency checks, and reorganizing or rebuilding indexes. For more information, see the following
resources:
Maintenance Plan Wizard (http://go.microsoft.com/fwlink/?LinkId=110855&clcid=0x409) for SQL
Server 2008
Database Maintenance Plan Wizard (http://go.microsoft.com/fwlink/?LinkId=217494) for SQL Server
2005
To determine the duration of each task, test each task individually before combining tasks into a
single plan. You may need to define several maintenance plans on separate schedules to allow
tasks to complete during hours when end-user operations will not be negatively affected.
The Maintenance Cleanup task removes files left over from executing a maintenance plan.
10. On the Select Maintenance Task Order page, change the order of the maintenance plan tasks if
needed. Select a task, and then click Move up or Move down. When tasks are correctly ordered,
click Next.
Note: If your databases are very large, you may want to create a separate maintenance plan for
checking database integrity less frequently than index maintenance.
Next, the wizard guides you through setting the details for each task.
11. On the Define Database Check Integrity Task page, select the databases to check for integrity, and
then click Next.
Note: You can safely check all SharePoint 2010 databases for integrity.
12. On the Define Reorganize Index Task page, in the Databases list, specify the databases to
reorganize the indexes for, select the Compact large objects check box, and then click Next.
13. On the Define Rebuild Index Task page, if you have chosen to rebuild indexes instead of reorganize
those, in the Databases list; specify the databases to reorganize the indexes for.
14. Select Change free space per page percentage, type 80, and then click next.
Change free space per percentage sets the fill factor for the database.
15. On the Define Maintenance Cleanup Task page, set the values that meet your needs, and then click
Next.
We recommend that you delete Maintenance Plan text reports.
16. On the Select Report Options page, select Write a report to a text file, select a location for the files,
and then click Next until the wizard is completed.