Triggering an event handler

Any event handler can be triggered manually, in addition to those occasions when it executes because of a schedule or system event. Triggering events manually can be useful during development of event handlers, and also, for certain events, in production environments. For example, you may have a monthly sales report scheduled, but from time to time you may want to obtain a sales report for a reason other than the end of the month.

For information on developing event handlers, see “Developing event handlers”.

StepsTriggering an event handler (SQL)

  1. Connect to the database as a user with DBA authority.

  2. Execute the TRIGGER EVENT statement, supplying the name of the event. For example:

    TRIGGER EVENT sales_report_event
    

    For more information, see “TRIGGER EVENT statement” in Chapter 6, “SQL Statements,” in the Sybase IQ Reference Manual.