Home Forums SQLServerCentral.com Editorials Are Triggers a "legacy" Feature? (Database Weekly, Nov 08 2008) RE: Are Triggers a "legacy" Feature? (Database Weekly, Nov 08 2008)

  • jfogel (2/19/2013)


    I get that but my point is that sometimes you don't want this and if a person is performing an action without knowing or forgetting there is a trigger they run the risk of triggering (pun intended) other processes they had no intention of kicking off such as 10,000 emails were sent because they inserted that many records.

    That's exactly the point of having a trigger!

    If the logic of the system (or audit spec) require report every addition to the data via email then - sorry - you should obey.

    And if a bugger is trying to sneak around and bypass some required steps - triggers are the best tool to prevent such a breach.

    But if you need to email only new data added via UI or some other specific interface - then emailing call must be implemented in that interface, not in the trigger on the base table.

    It again comes to incorrect usage, not to any kind of problem with triggers.

    _____________
    Code for TallyGenerator