Home
SQL Size online help Prev Page Prev Page
Introduction
About SQL Size
Version history
Contact us
User Guide
Architecture
Licensing
Installation
System requirements
Reference Guide
The SQL Size Agent service
The SQL Size Configuration application
SQL Server instances
Data collection schedule
Reports and emails
Report template
Data storage
Alerts
Script editor
Useful shortcuts
Activating your license
The SQL Size database
The SQL Size GUI
The Overview page
Export overview
Database analysis
Alerts history
Error history
Scripting
Data types
Script structure
Language basics
Debugging
Global variables
Functions
Alert functions
RaiseAlert
RaiseConditionalAlert
AddAlertDetails
Mathematical functions
Power
String formatting functions
FormatBytes
FormatFloat
Support functions
String functions
Date and time functions
Date-Time format strings
Class reference
TBaseClass
Properties
AverageDailyGrowth
Name
ObjectType
Size
SizeDesc
Tag
TInstance
Properties
Database
DatabaseByName
DatabaseCount
DatabaseDataSize
DatabaseExists
DatabaseFilestreamSize
DatabaseLogSize
DatabaseSize
PathCount
Path
TDatabase
Properties
DataSize
DBFile
DBFileCount
Filegroup
FilegroupCount
FilestreamSize
LogSize
TFilegroup
Properties
DBFile
DBFileCount
FilegroupType
TDBFile
Properties
Filegroup
FileType
Growth
IsPercentGrowth
MaxSize
Path
PhysicalName
TPath
Properties
FreeSpace
Enumerations
TFileType
TFilegroupType
TObjectType
Records
TGrowthStats
Constants

RaiseConditionalAlert

This function raises an alert if no similiar alert was previously raised in the interval specified by the LastAlertInHours parameter. The return value is an ID value you can use for the AddAlertDetails function.

Syntax:
function RaiseConditionalAlert(Description: string; Object: TBaseClass; LastAlertInHours: Integer; AlertGroup: Integer; AlertTag: string): Integer;  
 
Notes:
The scripting engine will only raise the alert if no alert with the same AlertGroup and AlertTag values were raised in the past LastAlertInHours hours.  

Example:

The script below raises the alert only if there were no alerts with the AlertGroup value of 101 and AlertTag value of 'master' were raised in the last 12 hours. 

functions_raiseconditionalalert