This section describes how to create events in DMS.
- You have access permissions to DMS and you have logged on to the DMS console.
After you log on to a database, check that event support has been enabled for the database.
SELECT @@event_scheduler;statement. If No is returned, event support has been enabled.
If OFF is returned, event support is disabled. You need to modify the configuration file or run the
SET GLOBAL event_scheduler = ON;statement to enable event support.
Select a target database and click Log On to Database.
Events, triggers, functions, stored procedures are programmable objects in DMS. In the left-side directory tree, click and open the Programmable Objects tab to view the programmable objects.
Right-click on Event and select Build (Event). The New: Event page is displayed, as shown below:
In the Basic Information area and Execute At area, set the event name, cycle time, start time, end time, status, and annotation.
In the Event Execution Statement area, set the operation to be performed when the scheduled event is triggered.
Set an event trigger rule and the SQL statement for event execution.
Click Save. DMS then generates the SQL statement used to create the event.
Click OK if the SQL statement is correct. DMS then runs the event in your database.
If the event is successfully generated, DMS returns a message indicating that the event has successfully been saved.
Click Programmable Objects > Event to check the saved event.
Check whether the event is properly executed in the SQL window.
You can perform event-related operations through the following menu options:
- Create (Event)
- Edit (Event)
- Delete (Event)