Unanswered: Can you send an E-mail notification when a table gets updated?
I created a couple stored procedures to execute from local, to a remote, and then back to the local site to test responsiveness. When the time it takes for the round trip goes above a certain threshold, I update a table that holds the site that is slow along with the time and date the connection was tested.
How can I get SQL Server 2000 to send out an E-mail to a user when this table gets a new row?
I would think that you would want to add a trigger looking for an insert into that table, but can you send out an E-mail notification from a trigger? If not, how can I rig something like this up using SQL Server?
Originally posted by snail
Or just send email from trigger directly (xp_sendmail).
That doesn't seem to work for me.
It says that:
"Either there is no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Outlook and set it as the default mail client."
Since we don't want to run MS Outlook all the time, I tried using BLAT, but I can't get SQL Server to execute the command line (at least it doesn't seem to) when the Alert gets activated, so I'm posting a question about that to see if there is some trick to it.
ooops, the previous posting was for Brett Kaiser's suggestion.
as to xp_sendmail, - use cdo instead, this way you won't have to run any mapi client in order to send mail. search for cdo and cdonts on google, you'll find tons of it. another way (requires installation of extended stored procedure) - search for xp_smtp_sendmail, also no client mapi required.