Thursday, March 22, 2012

email trigger

I'd like to setup a trigger to send an email, but can't use SQLMail because
I don't control the password to the account that is running the MSSQLSERVER
service. Is there any other way to have SQL send an email when an insert is
made to a particular table? Plus IT doesn't like the idea of Outlook
installed on a production server.You could use xp_smtp_mail. It requires that the ability to access a smtp
mail server. Quite 'safe' for a production server -unlike MAPI.
Mail -Sending
SQL 2000 - http://www.sqldev.net/xp/xpsmtp.htm
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Colin" <legendsfan@.spamhotmail.com> wrote in message
news:%23IQu$hjxGHA.3892@.TK2MSFTNGP03.phx.gbl...
> I'd like to setup a trigger to send an email, but can't use SQLMail
> because I don't control the password to the account that is running the
> MSSQLSERVER service. Is there any other way to have SQL send an email
> when an insert is made to a particular table? Plus IT doesn't like the
> idea of Outlook installed on a production server.
>|||Hi Colin
It is not really advisable to send emails from triggers as you will
potentially be increasing the transaction time significantly and therefore
increasing contention (blocking/deadlocking etc..). An alternative would be
to populate another table and then periodically have a process that emails
the information and clears the table down.
John
"Colin" wrote:
> I'd like to setup a trigger to send an email, but can't use SQLMail because
> I don't control the password to the account that is running the MSSQLSERVER
> service. Is there any other way to have SQL send an email when an insert is
> made to a particular table? Plus IT doesn't like the idea of Outlook
> installed on a production server.
>
>

No comments:

Post a Comment