Rebuild index using SQL Server Maintenance wizard in Management folder

1. Open SQL Server Management Studio (SSMS) and connect to your SQL Server instance.

2. Navigate to the Management folder:

  • In the Object Explorer, expand the server node.
  • Expand the Management folder.

3. Launch the Maintenance Plan Wizard:

  • Right-click on the Maintenance Plans node.
  • Select Maintenance Plan Wizard.

4. Create a New Maintenance Plan:

  • Follow the prompts to create a new maintenance plan.
  • Give your plan a name and description.

5. Select Maintenance Tasks:

  • Choose the Rebuild Index Task from the list of available tasks.
  • Click Next.

6. Reorder the Tasks:

If you have multiple tasks then specify the order of task in which it process.

7. Configure the Rebuild Index Task:

  • Select the databases and tables for which you want to rebuild indexes.
  • Configure the options such as fill factor, sort in tempdb, and online index rebuild (if supported).

8. Review and Finish:

  • Review the summary of your maintenance plan.
  • Click Finish to create the plan.

9. Schedule the Task:

In SQL Managment studio, Add the following:

  • Doubleclick on the Rebuild indexes maintenance
  • Set up a schedule for when the index rebuild should occur (e.g., daily, weekly).
  • Click OK.

Check the job in SQL Server Agent:

  • You can manually execute the plan or wait for the scheduled time.

Leave a Reply