Submit a ticketCall us

Looking to compare latest NPM features with previous versions of NPM?
The NPM new feature summary offers a comparison of new features and improvements offered with this release.

 

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: 8 Votes: 0 Revisions: 3

Overview

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.

Environment

SAM 5.5 or later

Steps

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

Tags

Classifications

Public