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) > Remove latency thresholds for DBs in AppInsight for SQL

Remove latency thresholds for DBs in AppInsight for SQL

Table of contents
Created by Robert Stidman, last modified by MindTouch on Jun 23, 2016

Views: 15 Votes: 0 Revisions: 3


This article contains a script that you can run after backing up the Orion database to remove critical warning statuses on the individual databases that AppInsight for SQL is monitoring.


SAM 5.5 or later


Run the following query against the Orion DB:

Purpose of the script is remove databases' thresholds in AppInsight for SQL (all instances)

1) script gets average read and write latency component IDs
2) searches for the IDs, which exist in Components table in the current DB and takes 'real' component IDs
3) goes into apm_thresholds table and removes lines by IDs which are not 'inherit from template'
declare @averageRead bigint
declare @averageWrite bigint

SET @averageRead = (select ID from APM_ComponentTemplate where UniqueId = '415d462a-f62b-47e6-880e-e2b13392a8f4')
SET @averageWrite = (select ID from APM_ComponentTemplate where UniqueId = 'f2f65292-efa7-4ad0-af76-0f74713add85')

delete from APM_Threshold where ID in (select ID from APM_Component where (TemplateID = @averageRead OR TemplateID = @averageWrite))and IsTemplate != '1'



Last modified
03:01, 23 Jun 2016