Database Maintenance

The Database Maintenance Service Task helps to optimize your database for more efficient data retrieval. It is recommended that the Database Maintenance Service Task be scheduled to run from time-to-time if it appears that performance on the Console has decreased.

The Database Maintenance Service Task has the following options:

Field Description
Information This text field is used to provide a description of the purpose of the Database Maintenance task being created and is only present to help users manage their tasks.
Shrink Database When this option is enabled it truncates the log file, freeing up disk space. Log file truncation frees space in the logical log for reuse by the transaction log. However, this process may also cause the indexes to become further fragmented, therefore it is recommended that the Defragment Indexes option be selected as well.
Defragment Indexes When this option is enabled the Database Maintenance task rebuilds the indexes. This helps to decrease the amount of time that is needed to scan the database, thus increasing performance. However, defragmenting the indexes may increase the size of the transaction log which may cause database backups to take longer.
Update Statistics SQL Server automatically generates data statistics which it uses to create optimal SQL execution plans. The data statistics auto update by default, but if your Console has frequent data updates, such as imports and purges, you may wish to enable this option to update the statistics when you perform your database maintenance.
Ensure Service Broker is Enabled Spirion uses the Service Broker for query notifications in SQL Server to notify you about settings and schedules changes across applications. The service broker needs to be enabled in order for these notifications to work. For example, if you change the schedule of a service task in the Console, the Server Service receives a notification about the schedule change in the database and updates its list of schedules by loading them fresh from the database. Enabling this options causes Spirion to check that the service broker is enabled and if finds that it is not, it enables it. You may choose to leave this option disabled if you have multiple database maintenance service tasks scheduled to run as you may want to schedule database indexing weekly in one task, but check the service broker daily in another.
Location

This allows you to select which database node the database maintenance service task runs on. This option only displays if you have chosen to replicate your database prior to installation of the Console. If you have a replicated database, it is recommended that you schedule two database maintenance service tasks to run, one for each node.

  • Data Node: Select this option to have the database maintenance service task run on the Data Node.
  • Processing Node: Select this option to have the database maintenance service task run on the Processing Node.
Resume when no other tasks are pending When selected, the "Repeat task every:" is ignored when no tasks are pending and the task starts immediately.
Maximum task run time

Specify the amount of time that the service task has to complete. For example, if you set the Maximum task run time to 5 minutes, after 5 minutes has elapsed from the time the service task first executes, the service job stops and its status shows as Aborted. The default setting is indefinitely. The following options are available:

  • Indefinitely - The task runs until completion.
  • Minutes - Set the number of minutes the service task has to complete. If the service task does not complete within the allotted time it aborts.
  • Hours - Set the number of hours the service task has to complete. If the service task does not complete within the allotted time it aborts.
  • Days - Select the number of days the service task has to complete. If the service task does not complete within the allotted time it aborts.