SQL Server Express Send Mail

  • As everyone knows, SQL Server Express does not have a SQL Server Agent nor does it have the innate ability to send an email based on events or triggers.

    My question is, has anyone successfully built a SP or Trigger that will send an email to one or more individuals based on either an event occurrence or a data update in a table from either SQL 2005 or 2008 Express? If so, can you explain how to do it?

  • It is fairly simple to do - you need to create an "ON UPDATE" trigger on your table (a) that pulls the data you want to send into either a temp or permanent table (b) (doesn't really matter which).

    THen all you need is a windows scheduled task that will go through (b) and send the emails out.

    It's also worth getting the scheduled task to flag the rows of (b) when the emails have been sent, just to ensure they're not sent twice.

    Sam Marsden

  • Check this link :

    [/url]

    Maybe can help you.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply