EMS logo

Products Navigation

SQL Manager for SQL Server

Our Partnership Status

Microsoft Certified Partner
Oracle Certified Partner
Embarcadero Technology Partner

EMS SQL Manager for SQL Server

On-line Documentation

Creating/editing trigger


Use the Trigger tab of Trigger Editor to create/edit a DML trigger and specify its properties.

 

Name

Enter a name for the new trigger, or modify the name of the trigger being edited.

 

Table or view

The drop-down list of tables and views allows you to select the table or view on which the trigger is executed.

 

Trigger Editor - Editing trigger definition

 

 

Type

Select the trigger behavior type:

RadioButton After

This selection specifies that the trigger is fired only when all operations specified in the triggering SQL statement have executed successfully.

RadioButton Instead of

This selection specifies that the trigger is executed instead of the triggering SQL statement.

 

 

On event

Specify the data modification statements that activate the trigger when it is tried against this table or view: Insert, Update or Delete. At least one option must be specified.

 

 

Options

 

CheckBox Enabled

Enables/disables the trigger immediately after it is created. Enabling a trigger causes it to fire when any Transact-SQL statements on which it was originally programmed are executed. A disabled trigger still exists as an object in the current database, but does not fire.

 

CheckBox Not for replication

This option allows you to specify that the trigger should not be executed when a replication agent modifies the table that is involved in the trigger.

 

CheckBox Encrypted

You can check this option to encrypt the text of the CREATE TRIGGER statement if you want to ensure that other users cannot view the trigger definition.

 

CheckBox ANSI Nulls

This option specifies ISO compliant behavior of the Equals (=) and Not Equal To (<>) comparison operators when they are used with null values. When this option is switched on, a SELECT statement that uses WHERE column_name = NULL returns zero rows even if there are null values in column_name. A SELECT statement that uses WHERE column_name <> NULL returns zero rows even if there are nonnull values in column_name.

 

CheckBox Quoted identifier

This option causes SQL Server to follow the ISO rules regarding quotation mark delimiting identifiers and literal strings. When this option is switched on, identifiers can be delimited by double quotation marks, and literals must be delimited by single quotation marks. When it is switched off, identifiers cannot be quoted and must follow all Transact-SQL rules for identifiers.

 

Execute as

Specify the security context under which the trigger is to be executed: RadioButton Caller, RadioButton Owner, RadioButton Current user or RadioButton User (select which user account should be used to validate permissions on the objects that are referenced by the trigger).

 

 

Code Source

Select the trigger code source: it can be a direct set of SQL statements or an external procedure call from a .NET assembly or DLL.

 

SQL statements or assembly method

This area allows you to set the trigger conditions and actions. Trigger conditions specify additional criteria that determine whether the tried DML statements cause the trigger actions to be performed.

The trigger actions take effect when the DML operation is performed.