Monday, March 19, 2012

E-mail notification when a record is added

I would like to be notified By E-Mail when a record is added to a particular
table in My SQL 2000 Database . How can I do That ?
Create a table to hold relevant information for the email to be sent.
Create a trigger on the table for which you want to be notified that does an INSERT to above table.
Create an SQL Server Agent job that reads off that table and uses xp_smtp_sendmail (www.sqldev.net)
to send the email.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"FRED" <FRED@.discussions.microsoft.com> wrote in message
news:76DD9CAD-74AC-43E4-A74C-6153F86EF3E3@.microsoft.com...
>I would like to be notified By E-Mail when a record is added to a particular
> table in My SQL 2000 Database . How can I do That ?
>
|||Hi,
1. Write a Insert trigger on that particular table.
2. COnfigure the SQL mail with a valid exchange server email account
3. Inside the trigger do
XP_SENDMAIL command (SEE BOOKS ONLINE for usage)
Thanks
Hari
SQL Server MVP
"FRED" <FRED@.discussions.microsoft.com> wrote in message
news:76DD9CAD-74AC-43E4-A74C-6153F86EF3E3@.microsoft.com...
>I would like to be notified By E-Mail when a record is added to a
>particular
> table in My SQL 2000 Database . How can I do That ?
>

No comments:

Post a Comment