Previous Topic: Define SQL Server Database TriggersNext Topic: Define SQL Server 2008 Triggers


Define SQL Server 2005 Triggers

Use the SQL Server Trigger Editor to define the stored procedures that exist for SQL server in a SQL Server 2005 physical model.

To define SQL Server 2005 triggers

  1. Click Triggers on the Model menu.

    The SQL Server Trigger Editor opens.

  2. Select the trigger in the Navigation Grid that you want to define and work with the following options:

    Note: Click New New icon in property editors to create a new object on the toolbar to create a new server trigger. Use the Enter filter text box to filter a very large list of server triggers to quickly locate the one that you want to define.

    Name

    Displays the server trigger name. You can change the trigger name in this field.

    Trigger Timing

    Specifies when the server trigger is executed. Make a selection from the drop-down list.

    Generate

    Generates SQL during forward engineering. Clear the check box if you do not want to generate SQL.

  3. Click the General tab and work with the following options:
    Trigger Events

    Specifies the server trigger events. If any of the selected events, or actions, occur in the server, the server trigger is executed. Select or clear the check boxes for the event groups and events that execute the server trigger.

    Type

    Specifies the permission level in effect when the server trigger is executed.

    Select User

    Specifies the user whose permissions are in effect for the execution of the server trigger.

    Note: This option is only available if you have selected the Execute As User option in the Type drop-down list.

    Enabled State

    Specifies whether the server trigger is enabled or disabled.

    Encryption

    Specifies that the server trigger is encrypted in the database.

  4. Click the Code tab to define the code type for the server trigger.
  5. Click the Expanded tab to view expanded code for the server trigger.
  6. (Optional) Click the Comment tab and enter any comments that you want to associate with the server trigger.
  7. (Optional) Click the UDP tab to work with user-defined properties for the server trigger.
  8. (Optional) Click the Notes tab to view history associated with the server trigger and to add or view user notes.
  9. Click Close.

    The server trigger is defined and the SQL Server Trigger Editor closes.

More information:

Define the Code Type for an Object in a SQL Server Property Editor

View Expanded Code in a Property Editor

Add a Comment in a Property Editor

Add a UDP in a SQL Server Physical Property Editor