This document describes the creation of a maintenance plan for system and SEP (Sem5) databases of SQL Server 2008. This plan is made of simple tasks that do not impact the operation of the databases. These activities aim at increase the performance of SQL Server 2008 and improve functioning and health of the database of Symantec Endpoint Protection Manager. All the configurations above were done in a windows 2008 R2 Enterprise server.
Software installed:
Microsoft windows 2008 R2 Enterprise 64 bits
Microsoft SQL server 2008 R2 64 bits
Hardware used:
1x itautec – intel Blade server
4x CPU Xeon 3.0
16 Gb RAM
2x 70 Gb Hard Disk
Environment:
5 x SEPM - version 11 RU6 MP3
1x SQL server 2008
1x LUA server
~45.000 clients
To create a maintenance plan we must access the SQL Server 2008,
1 - Open the console SQL Server Management Studio;
2 - Select the database engine and log on with SA account or administrator configured at installation time;
3 - After logging in, expand the instance of SQL Server installed.
4 - Click Maintenanceà Management plans;
5 - Right click on Maintenance Plans and Run the wizard (Maintenance Plan Wizard) to create a new maintenance plan;
NOTE: It is important to confirm that the SQL Server Agent service is running.
When creating the maintenance plan it is recommended to create separate tasks within the plan, because each one has a specific implementation schedule and customization within the plan.
These are the Maintenance tasks to be created:
1 - Check Database Integrity:
Run Health Check Database (Database Integrity Check) to verify the allocation and structural integrity of users, system tables, and indexes in the database. Performing this task ensures that any problems with the integrity of the database are reported, allowing them to be addressed later by a system administrator or database owner.
It is suggested to check the integrity of databases (System and SEP) daily:
2 - Shrink Database:
Use the Shrink Database Task dialog to create a task that attempts to reduce the size of the selected databases. Each file within a database can be reduced to remove unused pages. Although the mechanism of the database will reuse the space effectively, there are times when a file need not be as great as it was before, shrinking the file may then become necessary. Both data and transaction log files can be reduced, or shrunk. The database files can be shrunk manually, either in groups or individually, or the database can be configured to automatically reduce at specific intervals. It is suggested to shrink the SEP database once a week.
NOTE: Do not change the default information in this task.
3 - Reorganize Index:
SQL Server automatically maintains indexes whenever insert, update or delete is made to the data in your tables. Over time these changes can cause the information in the index to become scattered in the database (fragmented). Fragmentation exists when indexes have pages in which the logical order, based on the key value does not match the physical order of data within the file. Very fragmented indexes can degrade query performance and cause your application to respond more slowly.
It is recommended to reorganize the index of the SEP database (Sem5) daily:
4 - Update Statistics:
Updates information about the distribution of key values for one or more statistics groups (collections) in the specified table or indexed view. Update statistics occur in tables or indexed views ensuring that queries to compile updated statistics. However, the statistics update causes the query to be recompiled.
It is recommended to update statistics on SEP database daily.
5 - Clean up History
The History Cleanup task is a weekly routine, and the volume of data stored in the history is suggested by the client or the database administrator. In this case the data older than four weeks will be deleted promptly set the date and time on task:
6 - Backup full database
This is the most important task to be performed in SQL Server. At this point we will make a full backup of system databases and the SEP (Sem5) daily. There are several options to be customized in this task (check integrity, backup compression...). In this task we will simply perform a full backup of the databases in a .Bak file extension for each database:
7 - Cleanup Database Backup:
This task will be a customized routine to clean old backups on the server. It will depend on your backup and storage plan. In This case we decided to clean daily the files older than two days in the server:
8 - Memory Limit
After the creation of these tasks, it is suggested to make an adjustment of the maximum memory that the SQL service can consume. In this case it is recommended the reservation of approximately 20 to 30% of the total RAM for the OS and the rest to SQL. This setting is important because after starting the SQL service, it will consume gradually the memory of the host until its maximum value. In this example the field was set max server memory value to 13000 MB maximum memory that the SQL service can consume:
9 - Notifications - DatabaseMail
It is suggested to configure DatabaseMail to send notifications via e-mail or pager to the administrators. To reach this configuration it is necessary to first setup an account operator to send messages.
To configure an operator account:
1 - In SQL Management Studio, click SQL Server Agent à Operators;
2 - Select New operator and enter the required information;
After setting up the account operator you must setup the DatabaseMail:
1 - In SQL Management Studio, click Configure Database Mailà Database Mail;
2 - Follow the steps to configure the SMTP server and the account operator who will perform the sending of the alerts;
3 - After this configuration, test the alerts using the option Send test e-mail;
References - Symantec:
http://www.symantec.com/business/support/index?page=content&id=TECH122397&locale=en_US
References - Microsoft:
http://msdn.microsoft.com/en-us/library/ms186524 SQL.90 =% 28v% 29.aspx
http://msdn.microsoft.com/en-us/library/ms187348.aspx
http://msdn.microsoft.com/en-us/library/ms189080.aspx
http://msdn.microsoft.com/en-us/library/ms179349.aspx
http://msdn.microsoft.com/en-us/library/ms180226.aspx