Alarm notification in a SQL Server Express installation

For product installations using a supported edition of SQL Server Express, alarm notification for database size has been configured by default as follows:

For alarming purposes, the maximum size for a database on a system is set at 9 GB. This provides a buffer for taking action prior to reaching the 10 GB maximum, at which point the database stops logging data.

notice

loss of data

Do not allow a SQL Server Express database to reach the 10GB maximum before performing a database Trim action.

Failure to follow these instructions can result in an inoperable database and loss of data.

A notification message is automatically issued at 85% of the 9 GB maximum database size.

When the alarm threshold is reached, a message is logged in the System Log and also as a Critical event in the Alarms viewer. (You can access the Alarms viewer in the component of the product.) Depending on the volume of database logging that occurs, one of the following event notifications is generated (where database_name is the affected database and x is the percent threshold for event notifications):

Your database_name database is x% full. Data will stop being logged if your database is full. Please see the information about "Trim" in Database Manager's online help.

Your database_name database is x% full. You must take immediate action to prevent data loss. Data will stop being logged if your database is full. Please see the information about "Trim" in Database Manager's online help.

See "Trim" on page 1 for information about removing data from a database.

If you find that the threshold percentage needs to be changed for your installation, you can change it by editing the Configuration.ps1 file as follows:

Use Windows Explorer and navigate to the following location under the program's root directory:

...\config\cfg\DbScheduledTasks\Support

Edit Configuration.ps1 with a text editor and change the threshold percentage setting of 85 in:

$databaseSizeNotificationThresholdPercentage = 85

Edit Configuration.ps1 with a text editor and change the following:

For the gigabyte size, change the gigabyte setting of 9 in:

$maximumDatabaseSizeInGigabytes = 9

Note that the maximum value for gigabyte size is 10.

For the threshold percentage, change the percentage setting of 85 in:

$databaseSizeNotificationThresholdPercentage = 85

Save your change and close the text editor.