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.
Right-click on Maintenance Plans.
Select Maintenance Plan Wizard.
The Wizard screen will open.
Click Next.
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.
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.
Click the Next button.
Now you will select the tasks you want to perform in this plan.
You can select one or more to run in the plan.
If you select more than one task you next will select the order you want these tasks to run.
Each task will have options that need to be selected like which databases you want to run the task on.
The Reorganize task will ask for options on what databases and when to run the process.
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.
Click Next and then review the plan summary.
And if OK click Finish.
You will see a processing screen should the plan be setup.
Click Close.