Consider the following tips when creating triggers:
Suppose you have an insert or update trigger that calls a stored procedure, which in turn updates the base table. If the nested triggers configuration parameter is set to true, the trigger enters an infinite loop. Before executing an insert or update trigger, set sp_configure “nested triggers” to false.
When you execute drop table, any triggers dependent on that table are also dropped. To preserve any such triggers, change their names with sp_rename before dropping the table.
Use sp_depends to see a report on the tables and views referred to in a trigger.
Use sp_rename to rename a trigger.
A trigger fires only once per query (a single data modification such as an insert or update). If the query is repeated in a loop, the trigger fires as many times as the query is repeated.
Copyright © 2005. Sybase Inc. All rights reserved. |