ALTER TRIGGER GROUP
Use the ALTER TRIGGER GROUP
command to
enable or disable an existing trigger group.
Syntax
ALTER TRIGGER GROUP trigger_group_name | expression
SET ENABLED { TRUE | FALSE };
A trigger group is enabled by default.
You can specify a trigger group name or an expression with this command. If it is an expression, the name is not evaluated until run time.
Examples
This example disables the update_database_triggers trigger group.
alter trigger group update_database_triggers set enabled false;
This example disables all triggers except gateway triggers (belonging to the gateway_triggers trigger group) by individually listing the names of all the other trigger groups to be disabled.
Create trigger disable_triggers
Group gateway_triggers
Priority 1
on signal gw_counterpart_up
begin
alter trigger group trigger_group_name_1 set enabled false;
...
alter trigger group trigger_group_name_n set enabled false;
end;
This example uses an expression to disable all triggers except gateway triggers that belong to the gateway_triggers trigger group. At run time, the FOR EACH ROW loop is used to perform the actions in the expression, on each row in the catalog.triggers table.
Create trigger disable_triggers
Group gateway_triggers
Priority 1
on signal gw_counterpart_up
begin
for each row tg in catalog.triggers where
tg.GroupName <> 'gateway_triggers'
begin
alter trigger group tg.GroupName set enabled false;
end;
end;