Database Maintenance

Use

To enable healthy production environment and its proper maintenance, make sure that the recommendations about installing data files and transaction logs on different disks, and appropriate growth increment size are taken into account, see Installation Guide, section Installing Microsoft SQL Server Software.

Define and apply a maintenance policy for each database:

  • Backup database data files and transaction logs regularly.

  • Select the option Truncate the transaction log when making the backup.

  • Check the growth and size of the database data file and transaction log regularly.

    The growth increment size is too small if the expansion takes place frequently, and it must be adjusted accordingly. If logs are not truncated during backup, the file size grows and reserves disk space unnecessarily.

Note:

Following the file size and growth is very important in systems where e-mails with (large) attachments are being handled.

As of the version SP07, it is possible to save large attachments also in a folder, define related settings in SC System Services > E-Mail Settings > Attachment Settings. Also the attachments already placed in database can be moved to the attachment folder with a specific run, see Installation Guide > Moving E-Mail Data from Database and Cleaning Up Scripts.

recommendation:

In ASP environment,

  • Install different customer systems in different SQL instances.

  • Schedule the customer-specific SQL jobs so that other customer systems in the same instance or on the same servers run at different times. Several maintenance jobs running at the same time may impair SQL server performance.

    As of the version SP07, when the installation or upgrade procedure finds more than one Sinch Contact Center systems on the same SQL server it schedules the customer-specific SQL jobs serially, and scheduling the customer-specific SQL jobs is disabled.

Defining Database Alarm Notifications

Batch Job Server (BJS) provides with a job that regularly checks the SQL server error log and sends a notification of an error as specified in alarm rules. To utilize this job, you must:

  1. Define in the custom_rules.xml which alarms are notified, see below.

  2. Define in the System Configurator System Services > Batch Job Server Settings appropriate frequency for checking the error log.

  3. Install the Alarm Server, and define the notification method and recipient. For more information, see Installation Guide section Installing Alarm Server.

Defining Database Alarm Notification Rules

The rules.xml file located in the BJS virtual units \etc folder defines the rules for SQL alarm notifications. This file serves as an example on how rules are configured. To modify these rules, copy the rules.xml file, edit them, and save the file as custom_rules.xml in the same folder. If the file custom_rules.xml exists, it overrides the example file.

Each rule is an XML-node with the tag ALARM . Attributes of the node define the functionality of the rule. Agent attribute defines whether the rule is for SQL servers error log or SQL server agents error log (value 1). The Rule attribute contains SQL query that is executed on database. If the query returns any rows then an alarm specified by Name and Description attributes is raised at the alarm server.