This article explains how integrity check alert thresholds work in Minion Enterprise, and how you can easily configure different alerting scenarios to suit all your needs.

CheckDB alert thresholds are stored in the dbo.CheckDBReport table.  This table is the central place to configure all the integrity check alert thresholds for your entire environment.
 

CheckDB alert thresholds don’t require Minion CheckDB

A common misconception with Minion Enterprise is that you must be using Minion CheckDB in order to get the alerting benefits. That’s just not true.  
 
The last integrity check date data is stored in Collector.DBProperties as LastCheckDB; that’s where the alert gets the values to compare against the dbo.CheckDBReport table.
 

Control Alerts with the dbo.CheckDBReport table

The dbo.CheckDBReport table controls the alert thresholds, and whether a table or database gets CheckDB alerts at all. It comes with one or more rows configured.

As a quick example: to exclude all databases named "temp" - on all instances - from CheckDB reports, you would insert a row to dbo.CheckDBReport, with InstanceID=0, DBName='temp', and Report=0. See the sections below for more examples. 

The columns in dbo.CheckDBReport  are:
 
Column Name DataType Explanation
ID Bigint Identity
InstanceID Bigint The system-wide instance ID for the server.  This value comes from the ID column in the dbo.Servers table.
DBName Varchar(150) DB name you’re setting the threshold for.  A special value of ‘MinionDefault’ is given to stand for all the DBs on an instance.  See below for more details.
Report bit Whether to report on missing or out of date integrity checks.
CheckDBAlertThresholdInHrs int The threshold in hours that you want to use for reporting on missing CheckDB operations.
CheckTableAlertThresholdInHrs int The threshold in hours that you want to use for reporting on missing CheckTable operations.
SchemaName varchar The schema name of the table this threshold applies to, if any. (Only applies to CheckTable.)
TableName varchar The name of the table this threshold applies to, if any. (Only applies to CheckTable.)
IsActive bit Whether this threshold is active.  Active means it’s currently being considered when evaluating alerting thresholds.  Turning this row off can be a useful tool in your environment.  
Comment Varchar(2000) This lets you know what the current threshold row is for.  You can use it to document reasoning as well as entire site failovers or custom timed threshold changes.  See examples below.
 


Conceptually, using this table is very easy.  It starts with the pervasive ME concept that global values are set, and then only overridden for exceptions.  So:
  • A default row, covering all instances, will have InstanceID=0 and DBName = ‘MinionDefault’, with SchemaName and TableName set to NULL.
  • To set different thresholds for all ‘master’ databases on all instances, enter a row with InstanceID=0 and DBName=’master’.
  • And so on.
 

Manage CheckDB Alert Thresholds with Setup.CheckDBReportThreshold

You can certainly manage this table manually with Insert/Update/Delete statements. But, it’s easier to use the procedure provided: Setup.CheckDBReportThreshold.  Not only is it easier, but it has standardized functionality that helps remove human error out of the process. 

How to handle missing Integrity Check alerts: Fix, Defer, or Except

When you first install Minion Enterprise, you might start receiving missing CheckDB alerts. You have several options for handling these alerts: resolve, change the threshold, or defer the alert. 

Change the Threshold

Change the CheckDB alert threshold, if the instance in question has less frequent integrity checks:
EXEC Setup.CheckDBReportThreshold
@ServerName = 'MyServer',
@DBName = 'MinionDefault', -- This will apply to all databases
@CheckType = 'CheckDB';
This inserts a row to dbo.CheckDBReport.
 

Change the Threshold for a single database

Change the CheckDB alert threshold for a single database , if the database in question has less frequent integrity checks:
EXEC Setup.CheckDBReportThreshold
@ServerName = 'MyServer',
@DBName = 'MyDB', 
@CheckType = 'CheckDB';
This inserts a row to dbo.CheckDBReport.
 

Defer the Alert

Defer the instance in question from alerts for a specific period of time, if the resolution is coming (and you don’t want alerts in the meantime):
EXEC Setup.CheckDBDefer
@ServerName = 'MyServer',
@DBName = 'MinionDefault',
@ErrorType = 'Missing',
@DeferDate = '08/20/2015',
@DeferEndDate = '08/20/2015',
@DeferEndTime = '06:00';
This inserts a row to the table Alert.CheckDBDefer.