Triggers

External Article

Avoid External Dependencies in SQL Server Triggers

  • Article

I sometimes want to perform auditing or other actions in a trigger based on some criteria. More specifically, there are a few cases that may warrant an e-mail; for example, if a web sale takes place that requires custom or overnight shipping and handling. It is tempting to just add code to the trigger that sends an e-mail when these criteria are met. But this can be problematic for two reasons: (1) your users are waiting for that processing to occur, and (2) if you can't send the e-mail, how do you decide whether or not to roll back the transaction, and how do you bring the problem to the attention of the administrator?

2011-02-14

2,819 reads

Blogs

Being a script magpie

By

Last month (I ran just a little bit late writing this, it was meant...

Community Tools Month 2022 - dbatools

By

The Prompt In July, Brent Ozar (blog | twitter) asked us to make September...

Storytelling with Data – Enertia User Conference 2022

By

Thank you to everyone who attended my session at the Enertia User Conference in...

Read the latest Blogs

Forums

Alight Motion is safe for users?

By Zara Alight1

Description: Alight Motion edits application that allows you to edit videos in the Android smartphone....

How to calculate orders historically, during month

By Zond Sita

Good Morning There, CREATE TABLE Customers ( CID int NOT NULL PRIMARY KEY, GroupName...

How Important is Software?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item How Important is Software?

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers