All Products
Search
Document Center

:Create triggers

Last Updated:Apr 26, 2020

This section describes how to use triggers in DMS.

Prerequisites

You have access permissions to DMS and you have logged on to the DMS console.

Procedure

  1. Select a target database and click Log on to Database.

  2. Triggers, functions, stored procedures, and events are programmable objects in DMS. In the left-side directory tree, click the Programmable Objects tab. Programmable objects are displayed.

  3. Right-click on the Trigger list and select Build (Trigger). The New: Trigger page is displayed as shown below.

    Build trigger

  4. Enter required information to configure the trigger.

    • Configure the trigger.

      • Enter the trigger name.
      • Select a trigger table. This example selects the dmstest marked by 1.
      • Select trigger time. In this example, select Trigger After Event.
      • Select a trigger event. In this example, select Insert Event.
    • Configure a trigger statement.

      • Set the operation that the trigger performs when the specified event occurs.
  5. Click Save after you complete trigger settings. DMS then generates the SQL statement used to create the trigger based on your settings. Confirm the SQL statement.

  6. Click OK. DMS then saves the trigger to your database. DMS returns a message indicating that the trigger is successfully saved. Click Programmable Objects > Trigger to check the saved trigger.

  7. Check the result set in the SQL window to verify that the Insert operation is correctly processed by the trigger as shown below.

  8. Click Programmable Objects > Trigger to perform trigger-related operations through the following menu options.

    Notes

    • Create (Trigger)
    • Edit (Trigger)
    • Delete (Trigger)