0

Does SQL Server has the ability to send a notification to a specific email address when some events have been triggered?

Context: I have a table contains a lot records about many partners. I wish if any partner's records have been changed, the SQL Server will send an email including all the changed records to the partner. There are at least 100 partners in the table. So SQL Server needs to know which email address to use.

Does anyone know if SQL Server has the ability, and how can I implement it?

CodTango
  • 345
  • 1
  • 3
  • 15
  • This question appears to be off-topic because it is about database administration/configuration, and not programming. Additionally, it does not include enough details for a good answer. – Andrew Barber Apr 09 '14 at 19:48
  • A simple answer Yes.You will need to Create an `AFTER UPDATE,INSERT,DELETE Trigger` on your table. And inside your trigger you can send emails to the people who's records has been changed. But is something you should avoid doing as Aaron Bertrand has explained here [`Bad habits to kick : abusing triggers`](https://sqlblog.org/2009/10/12/bad-habits-to-kick-abusing-triggers) – M.Ali Apr 09 '14 at 19:52

1 Answers1

0

Yes. You can setup SQL server agent mail to send emails. For more information:

http://technet.microsoft.com/en-us/library/ms188235(v=sql.105).aspx

Sefa
  • 8,865
  • 10
  • 51
  • 82