SET TRIGGERS statement

Use the SET TRIGGERS statement to enable or disable all or some of the triggers on a table, or all or some of the INSTEAD OF triggers on a view.

Syntax

SET TRIGGERS { trigger | FOR [ 'owner' . ] { table | view } } { ENABLED | [ { DISABLED } ] }
Element Description Restrictions Syntax
owner The owner of table or view Must own the table or view Owner name
table Table whose triggers are all to be enabled or disabled Must exist Identifier
trigger Trigger to be enabled or disabled Must exist Identifier
view View whose INSTEAD OF triggers are all to be enabled or disabled Must exist Identifier

Usage

The SET TRIGGERS statement is a special case of the SET Database Object Mode statement. The SET Database Object Mode statement can also enable or disable an index or a constraint, or change the filtering mode of a unique index or of a constraint.

For the complete syntax and semantics of the SET TRIGGERS statement, see SET Database Object Mode statement.

Restrictions on secondary servers

In cluster environments, the SET TRIGGERS statement is not supported on updatable secondary servers. (More generally, session-level index, trigger, and constraint modes that the SET Database Object Mode statement specifies are not redirected for UPDATE operations on table objects in databases of secondary servers.)