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?


2,819 reads


Publish ADF from code to further environments


Struggling with #ADF deployment? adf_publish branch doesn’t suit your purposes? Don’t have skills with PowerShell? I have good...

Getting the Proc Code–#SQLNewBlogger


Another post for me that is simple and hopefully serves as an example for...

Running SQL Server in Google Cloud Platform


On a few occasions I’ve referred to GCP (Google Cloud Platform) as the “Windows...

Read the latest Blogs


How to efficiently perform search on my DB and Word documents on my server?

By umeshamin

So I'm building a system for a client and they want to have a...

Copy Azure SQL DB App data to Azure Synapse

By DataBanker

Hello, I am looking for the best way to copy change data from my...

Enable normal user to execute a sys stored procedure


I tried GRANT EXECUTE ON OBJECT :: sys.sp.droprolemember TO John; GO Cannot find the...

Visit the forum


SQL Server Q&A from the SQLServerCentral community

Get answers