Maintenance of SQL Database

Last modified by Dennis Knudsen on 2024/04/03 11:25

It's important to maintain the IMPACT Database so it doesn't get slow over time. One way to do this is to create a maintenance plan for rebuilding the index and updating the statistics.

NOTE: It requires a Standard SQL version to be able to make maintenance plans.

1) Start by selecting the Maintenance Plan Wizard" by right-clicking on the Maintenance Plans under the Management folder.


2) Click Next in the first dialogue box


3) Start by giving the maintenance plan a name and set the schedule for when the plan should be executed.


4) Start by setting how frequently the maintenance plan should run (In this example - Daily at 01:00) and the first and last date for the plan (No end date) and finish with OK and thereafter next.


5) Check the "Rebuild Index" and "Update Statistics" for the tasks to perform and click next.


6) Select what order the tasks should be performed. 


7) Select the IMPACT database so the task only gets performed on that specific database.


8) And then configure the Index Stats Options for when the rebuild should happen and click next.


9) Select the same database for the update statistics task and keep the default values and click next.


10) Select if there should be a report of the tasks and where it should be saved (The default is checked) and click next.


11) The maintenance plan is now configured and click finish to enable it and there after close.



12) The Plan is now enabled and will run according to the configuration.


13) It's also possible to "test" the plan by right-clicking and click Execute. Executing might take some time depending on the server specifications and the database size.


14) To check if the plan has been executed should the Index be rebuilt on the tables in the IMPACT database. Check the Index of dob.IMP_ELEMENT to see the index value. The Value should be as low as possible.