Submit a ticketCall us

AnnouncementsFace your biggest database issues head-on

Our new eCourse helps you navigate SQL Server performance blocks by teaching you how to recognize and deal with the three DBA Disruptors: Performance Hog, Blame Shifter, and Query Blocker. Register today to learn how to defend your environment and fend off menacing disruptions.

Register for your free eCourse.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > 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

Tags

Classifications

Public