Submit a ticketCall us

Solarwinds & Cisco Live! Barcelona
Join us from the 29th of January to the 2nd of February at Cisco Live 2018 in Barcelona, where we will continue to show how monitoring the network with SolarWinds will keep you ahead of the game. At our booth (WEP 1A), we will demonstrate how SolarWinds network solutions can help. As a bonus, we are also hosting a pre-event webinar - Blame the Network, Hybrid IT Edition with our SolarWinds Head Geek™, Patrick Hubbard on January 24th - GMT (UTC+0): 10:00 a.m. to 11:00 a.m. There's still time to RSVP.

Home > Success Center > Archive > 2017December13 - Deletes > 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 Kevin.Swinson on Dec 13, 2017

Views: 1,017 Votes: 0 Revisions: 4


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