Submit a ticketCall us

Don’t fall victim to a ransomware attack
Backups are helpful, but sometimes that’s not enough to protect your business against ransomware. At our live webcast we will discuss how to protect against ransomware attacks with SolarWinds® Patch Manager and how to leverage log data to detect ransomware. Register now for our live webcast.

Home > Success Center > Server & Application Monitor (SAM) > AppInsight for SQL: Create an alert trigger based on how much available space is occupied in the database

AppInsight for SQL: Create an alert trigger based on how much available space is occupied in the database

Table of contents

Overview

This article provides steps to create an alert trigger based on how much available space is occupied by the actual data in your database.

Environment

All SAM versions

 

Steps

Measure how much of the maximum size is used.

Use a Custom SQL Alert for AppInsight for SQL: Database. Use the following as a filter in for the trigger condition:

JOIN APM_SqlBbDatabaseFileAlertsData AS dbfile
ON APM_SqlBbDatabaseAlertsData.DatabaseID = dbfile.DatabaseID

WHERE dbfile.FileType = 0 AND ((dbfile.UsedSpace * 100.0 / (dbfile.Size + dbfile.DatabaseFileFreeSpace)) > 5.0)

 

Use the following as a filter for the reset condition:

JOIN APM_SqlBbDatabaseFileAlertsData AS dbfile

ON APM_SqlBbDatabaseAlertsData.DatabaseID = dbfile.DatabaseID

WHERE dbfile.FileType = 0 AND ((dbfile.UsedSpace * 100.0 / (dbfile.Size + dbfile.DatabaseFileFreeSpace)) <= 5.0)

Note: Where the 5.0 means if more than 5.0% of the available space is being used by the data, trigger the alert.

 

 

Last modified
00:15, 1 Dec 2016

Tags

Classifications

Public