Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - SQL Reference » Using SQL » SQL functions » Alphabetical list of functions

 

EVENT_CONDITION function [System]

Specifies when an event handler is triggered.

Syntax
EVENT_CONDITION( condition-name )
Parameters
  • 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. The conditions and the events for which they are valid are as follows:

    Condition name Units Valid for... Comments
    DBFreePercent n/a DBDiskSpace
    DBFreeSpace MB DBDiskSpace
    DBSize MB GrowDB
    ErrorNumber n/a RAISERROR
    IdleTime seconds ServerIdle
    Interval seconds All Time since handler last executed
    LogFreePercent n/a LogDiskSpace
    LogFreeSpace MB LogDiskSpace
    LogSize MB GrowLog
    RemainingValues integer GlobalAutoincrement The number of remaining values
    TempFreePercent n/a TempDiskSpace
    TempFreeSpace MB TempDiskSpace
    TempSize MB GrowTemp

Remarks

The EVENT_CONDITION function returns NULL when not called from an event.

See also
Standards and compatibility
  • SQL/2003   Vendor extension.

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;