If you create an event handler without a schedule or system event to trigger it, it is executed only when manually triggered.
Connect to the database as a user with DBA authority.
Select the Events folder for your database.
From the File menu, choose New > Event.
The Create Event wizard appears.
Type a name for the event, and then click Next.
Select Manually, and then click Next.
Select Enable This Event, and select Execute at All Databases, and then click Next.
Optionally, type a comment describing the event, and then click Finish to add the event to the database.
Enter the SQL statements for your event handler, and then choose File > Save.
If you want to accept the default values for all remaining options, you can click Finish at an earlier stage in the wizard.
Connect to the database as a user with DBA authority.
Execute a CREATE EVENT statement with no schedule or WHERE clause. The restricted syntax of the CREATE EVENT is as follows:
CREATE EVENT event-name
HANDLER
BEGIN
... //event handler
END
If you are developing event handlers, you can add schedules or system events to control the triggering of an event later, either using Sybase Central or the ALTER EVENT statement.