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

SQL Anywhere 12.0.1 » SQL Anywhere Server - Database Administration » Database maintenance » Task automation using schedules and events » Schedule and event internals


How event handlers are executed

When an event handler is triggered, a temporary internal connection is made on which the event handler is executed. The handler is not executed on the connection that caused the handler to be triggered, so statements such as MESSAGE...TO CLIENT, which interact with the client application, are not meaningful within event handlers. Similarly, statements that return result sets are not permitted.

The temporary connection on which the handler is executed does not count towards the connection limit for licensing purposes, and the procedure specified by the login_procedure option is not executed for event connections.

Event creation requires DBA authority, and events execute with the permissions of their creator. If you want event handlers to execute with non-DBA authority, you can call a procedure from within the handler, as stored procedures run with the permissions of their creator.

Any event errors are logged to the database server message log.


The transaction in an event handler is committed if no errors are detected during execution, and rolled back if errors are detected. See Exception handling and atomic compound statements.