Technical FAQs

Ask a Question

StruxureWare Power Monitoring : How to configure the Database Size Notification task

Issue

As of StruxureWare Power Monitoring (SPM) 7.0.1, installations that use SQL Server Express Editions will include a Windows Scheduled Task named [ION_Data] - SIZE NOTIFICATION - Job. This task monitors the size of the database in order to alert the users when the ION_Data database is reaching the 10 Gb size limit enforced by SQL Express.
The task is configured with default values, this article shows what those values are and how to change them.

Product Line
StruxureWarePower Monitoring 7.x.x
Power Monitoring Expert PMEv8.0

Environment
Windows Task Scheduler
WindowsPowerShell

Cause
As of StruxureWare Power Monitoring (SPM) 7.0.1, installations that use SQL Server Express Editions will include a Windows Scheduled Task named [ION_Data] - SIZE NOTIFICATION - Job. This task monitors the size of the database in order to alert the users when the ION_Data database is reaching the 10 Gb size limit enforced by SQL Express. 
The task is configured with default values, this article shows what those values are and how to change them.

Resolution
 

The [ION_Data] - SIZE NOTIFICATION - Job uses a configuration file to store settings, this file can be found here:
 

  • <SPM/PME_Installation_Folder>\config\cfg\DbScheduledTasks\Support\Configuration.ps1

The Configuration.ps1 file contains the following settings and default values:
  • Name: locationForBackupFiles
    Default setting: cfg\DBBackups\
    Description: Contains the location where the backup file (.bak file) will be saved. (This setting will not be detailed in this article)

    Name: maximumDatabaseSizeInGigabytes
    Default setting: 9 (this is in gigabytes)
    Description: The following setting specifies the largest size that a database is allowed to be on a system.

    Name: databaseSizeNotificationThresholdPercentage
    Default setting: 85
    Description: The following setting defines the threshold for when a database size notification message will be issued. For example, setting the value to 75 means that the message will be issued when the database reaches 75% of the maximum database size allowed (the maximumDatabaseSizeInGigabytes setting mentioned above).

The way the task uses these values is by measuring the current size of the ION_Data database, and comparing this size to a percentage relative to the maximum database size set in the maximumDatabaseSizeInGigabytes setting. If this percentage is equal to or higher than the value of the databaseSizeNotificationThresholdPercentage setting, a message will be logged to the System Log that can be seen in the Active Alarm Viewer and the Event Log in Vista.

The configuration values can be changed to serve specific notification purposes, for example if you want to be alerted of the database size earlier than the 85% of 9GB (this default was chosen to allow enough time to take preventive action).

Important Note : This are the ranges allowed for the configuration values, entering values outside of this ranges will cause the task to malfunction and result in notification failures:
  • Setting: maximumDatabaseSizeInGigabytes
    Range: 0 - 10 (based on the maximum database size enforced by SQL Express)

    Setting: databaseSizeNotificationThresholdPercentage
    Range: 0 - 100
           Transaction Log File: The size of the ldf file is not taken into consideration of the maximum database size enforced by SQL Express. Only the mdf file size is used in the calculations.
Was this helpful?
What can we do to improve the information ?