Submit a ticketCall us

Webinar: Web Help Desk for HR, Facilities and Accounting Departments
This webinar will focus on use cases for HR, Facilities and Accounting.

Having a unified ticketing and asset management system for all the departments in your company can provide end-users with a seamless experience and make things easier for your IT team. Yet, with different business tasks and objectives, many departments don’t fully understand the capabilities of Web Help Desk and how the software can be customized for effective use in their departments.
Register Now.

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: 23 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