Note:
This guide is for expert computer administrators with experience in working with databases. It is intended to help you set up a maintenance plan. However, this guide is in no way a basis for claims in case of data loss. The customer is solely responsible for ensuring a full, correct and restorable backup of data.
A prerequisite is a working SQL backup as described in "Setting up an SQL backup for BMD NTCS".
Windows 7 / server 2008 R2 or earlier versions:
Start → Programs → Microsoft SQL Server 20xx → start SQL Server Management Studio.
Windows 8 / server 2012 or later versions:
Enter ‘SQL Server Management Studio’ in the search dialogue of the Metro user interface or use the arrow button to search and start it.
Windows 10 / server 2016 or later versions:
Start → Microsoft SQL Server 20xx → SQL Server Management Studio
Alternatively, you can find the SQL Server in Windows Explorer under the following path:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft SQL Server 20xx
For SQL Server 2017 or higher the slightly altered path and name are:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft SQL Server Tools xx
Replace “xx” with the respective SQL version in use.
CAUTION!
If Windows User Account Control (UAC) is active, you have to start SQL Server Management Studio by right-clicking and selecting ‘Run as administrator’!
In SQL Management Studio → Management → right-click on ‘Maintenance Plans’ → Maintenance Plan Wizard:
Enter name and description accordingly and click on ‘Change’ to define the schedule.
You should arrange for SQL maintenance to occur at a time when preferably no one is working, for instance on Sunday at 23:00.
Select the following tasks:
In large environments or to decrease the duration of the maintenance plan, you can also use ‘Reorganize index’ instead of ‘Rebuild index’.
It is crucial that you define the task order as follows:
Rebuild Index – Update Statistics – Check Database Integrity
Next, please select BMD database and set ‘Change free space per page percentage to’ in ‘Define Rebuild Index Task’ to 20%. As for the other options, you can leave the default values.
If you have set up e-mail notifications as described in ‘Setting up SQL e-mail notifications’, you can activate them now.
If the maintenance plan has been created correctly, it will show up in ‘Jobs’.