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

RaiseAlert

This function raises an alert, which will be stored in the SQL Size data store, and also sent via email if configured. The return value is an ID value you can use for the AddAlertDetails function.

Syntax:
function RaiseAlert(Description: string; Object: TBaseClass; AlertGroup: Integer = 0; AlertTag: string = ''): Integer;  
 
Notes:
The AlertGroup and AlertTag parameters are optional. The default value for AlertGroup is 0, and the default value for AlertTag is a blank string. You can use these values to identify specific alerts you create, which you can then raise conditionally using the RaiseConditionalAlert function.  
 
The Object parameter is used to identify the object that the alert is being raised for. You can also pass a nil value to Object.  

Example:

functions_raisealert