Changes the definition of an event or its associated handler for automating predefined actions. Also alters the definition of scheduled actions.
ALTER EVENT event-name [ DELETE TYPE | TYPE event-type ] { WHERE { trigger-condition | NULL } | { ADD | [ MODIFY ] | DELETE } SCHEDULE schedule-spec} [ ENABLE | DISABLE ] [ [ MODIFY ] HANDLER compound-statement | DELETE HANDLER} event-type - (back to Syntax) BackupEnd | “Connect” | ConnectFailed | DatabaseStart | DBDiskSpace | “Disconnect” | GlobalAutoincrement | GrowDB | GrowLog | GrowTemp | IQMainDBSpaceFree | IQTempDBSpaceFree | LogDiskSpace | “RAISERROR” | ServerIdle | TempDiskSpace trigger-condition - (back to Syntax) event_condition( condition-name ) { = | < | > | != | <= | >= } value schedule-spec - (back to Syntax) [ schedule-name ] { START TIME start-time | BETWEEN start-time AND end-time } [ EVERY period { HOURS | MINUTES | SECONDS } ] [ ON { ( day-of-week, … ) | ( day-of-month, … ) } ] [ START DATE start-date ]
SELECT event_id, event_name FROM SYS.SYSEVENT
SELECT event_id, sched_name FROM SYS.SYSSCHEDULE
When you alter an event using ALTER EVENT, specify the event name and, optionally, the schedule name.
Each event has a unique event ID. Use the event_id columns of SYSEVENT and SYSSCHEDULE to match the event to the associated schedule.