How to Create a SQL Database Maintenance Plan

Description of Issue: 

How can the indexes on a SQL Database be rebuilt to try and improve the performance of the application, views, or reports? 

Solution: 

You should have an SQL maintenance plan in place to take care of the regular maintenance that needs to be performed on your databases to keep things running at an optimal level. 

This can easily be done using the SQL Maintenance plans within the SQL Management Studio application. 

You can pick tasks like reindexing and reorganizing indexes or backing up the database. 

Open SQL Server Management Studio (SSMS). 

To use Maintenance Plans SQL server Agent needs to be running. 

If it is not right click on the SQL Server Agent and select Start. 

Text Description automatically generated 

 Right-click on Maintenance Plans. 

Select Maintenance Plan Wizard. 

Graphical user interface, text, application Description automatically generated 

The Wizard screen will open. 

Click Next. 

Graphical user interface, text, application Description automatically generated 

Give your plan a name and description. 

This is also where you can set the schedule for when the plan will run and how often. 

Graphical user interface, text, application, email Description automatically generated 

 Click the Change button to set up a schedule. 

Here you will pick the frequency of when the plan will run and what time. 

Once finished click OK.

Graphical user interface, application Description automatically generated  

Click the Next button.  

Graphical user interface, text, application, email Description automatically generated 

Now you will select the tasks you want to perform in this plan. 

You can select one or more to run in the plan. 

Graphical user interface, text, application, email Description automatically generated 

If you select more than one task you next will select the order you want these tasks to run. 

Graphical user interface, text, application, email Description automatically generated 

Each task will have options that need to be selected like which databases you want to run the task on. 

Graphical user interface, application Description automatically generated 

The Reorganize task will ask for options on what databases and when to run the process. 

Graphical user interface, text, application, email Description automatically generated 

After you have completed the setup for the various tasks in your plan you will select where to save the report created when the plan finishes. 

You can also select to email the report to someone on completion.  

Graphical user interface, text, application Description automatically generated 

Click Next and then review the plan summary. 

And if OK click Finish. 

Graphical user interface, text, application, email Description automatically generated 

You will see a processing screen should the plan be setup. 

Graphical user interface, text, application, email Description automatically generated 

Click Close. 

Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted for approval.