EVENT_CONDITION Function [System]

Specifies when an event handler is triggered.

To define an event and its associated handler, use the CREATE EVENT statement.

Syntax

EVENT_CONDITIONcondition-name )
Note: CIS functional compensation performance considerations apply.

Parameters

Parameters

Parameter

Definition

condition-name

The condition triggering the event. The possible values are preset in the database, and are case-insensitive. Each condition is valid only for certain event types.

Valid conditions for events

Condition name

Units

Valid for

Comment

DBFreePercent

N/A

DBDiskSpace

DBDiskSpace shows free space in the system database file (.db file), not the IQ store.

DBFreeSpace

Megabytes

DBDiskSpace

 

DBSize

Megabytes

GrowDB

 

ErrorNumber

N/A

RAISERROR

 

IdleTime

Seconds

ServerIdle

 

Interval

Seconds

All

Time since handler last executed.

LogFreePercent

N/A

LogDiskSpace

 

LogFreeSpace

Megabytes

LogDiskSpace

 

LogSize

Megabytes

GrowLog

 

RemainingValues

Integer

GlobalAutoincrement

The number of remaining values.

TempFreePercent

N/A

TempDiskSpace

TempDiskSpace shows free space in the system temporary file (pointed to by TEMP or IQTMP16 environment variable), not the IQ temporary store.

TempFreeSpace

Megabytes

TempDiskSpace

 

TempSize

Megabytes

GrowTemp

 

Returns

INT

Example

The following event definition uses the EVENT_CONDITION function:

create event LogNotifier
type LogDiskSpace
where event_condition( 'LogFreePercent' ) < 50
handler
begin
	message 'LogNotifier message'
end

Standards and Compatibility

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Not supported by Adaptive Server Enterprise.

Related reference
EVENT_PARAMETER Function [System]