Database Reference
In-Depth Information
Triggers always run in the context of a transaction. Any active locks; that is, data and schema, will be held while
a trigger is running and until the transaction is completed. You need to make your triggers as quick and efficient as
possible and avoid any actions that can potentially take a long time. For example, it is the bad idea to implement an
audit trail function that uses an external (linked) server for the logging. If that server goes down, it will take a long time
for a connection attempt to timeout. In addition, if you did not handle the exception properly, it would rollback the
original transaction.
Keeping all of these implications in mind, you need to be very careful when dealing with the triggers. It is better
to avoid them unless absolutely necessary.
Search WWH ::




Custom Search