To specify when an event handler is triggered.
EVENT_CONDITION ( condition-name )
CIS functional compensation performance considerations apply. See “Conditions that cause processing by SQL Anywhere” in Chapter 3, “Optimizing Queries and Deletions,” in the Performance and Tuning Guide.
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. Table 4-20 lists the conditions and the events for which they are valid.
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 IQTMP15 environment variable), not the IQ temporary store. |
TempFreeSpace |
Megabytes |
TempDiskSpace |
|
TempSize |
Megabytes |
GrowTemp |
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
CREATE EVENT statement in Reference: Statements and Options