An ASA event handler can be invoked manually by trigger event statements or automatically, based on an occurrence of system event conditions or fixed schedules.
To create an ASA event handler, you must have an ASA connection profile open. See Creating an ASA Connection Profile.
Under an ASA connection profile in Database Explorer, right-click the Events folder and select New Event to launch the Create Event Handler Skeleton wizard.
In the Name field, enter the event name.
The Preview window automatically begins generating the appropriate template code for your stored procedure.
Select Disable Event to disable the event so that it does not execute when the scheduled time or triggering condition occurs. A trigger statement does not execute a disabled handler.
From the Execution Location drop-down, specify where the event is to be executed:
ALL: The default value. All databases execute the event.
CONSOLIDATED: Restricts the databases at which an event is handled.
REMOTE: Restricts to remote sites the databases at which an event is handled.
For Trigger Type, select an option:
Trigger Type | Procedure |
---|---|
Manual | If you create an event handler without a schedule or system event to trigger it, it is executed only when triggered manually. Click Finish. The ASA scheduled event handler definition skeleton appears in SQL Editor. |
Schedule |
|
Condition |
|
In the Comments field, document the purpose and application of your stored procedure.
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com