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

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » Automating Tasks Using Schedules and Events » Event handling tasks

Adding a manually-triggered event to a database Next Page

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 more information about developing event handlers, see Developing event handlers.

To trigger an event handler (Sybase Central)
  1. Connect to the database as a user with DBA authority.

  2. Open the Events folder for your database.

  3. Select the event you want to trigger, and then choose File > Trigger.

    The event must be enabled before you can trigger it. You can enable the event on the General tab of the Event property sheet.

    The Trigger Event dialog appears.

  4. Supply any parameters the event handler requires, in a comma-separated list, as follows:

    parameter=value,parameter=value

    Click OK to trigger the event handler.

To trigger 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;

    See TRIGGER EVENT statement.