开发者

Sending mail or SMS after the query has been executed

Currently I am dealing with a large dataset and some queries are executing several hours. In the meantime I am doing other things. In order to use time efficiently I have been thinking about implementing the logic to send email or SMS message after the query is complete so I can analyze the data.

I know how to do it by writing custom application but wouldn't like to reinvent the wheel if any similar solution already exists. Does anyone of you know if there already开发者_StackOverflow社区 exists any notification system that could be used for this purpose?

Thank you


SQL Server has sp_send_dbmail built in. You could run that as the last step of your batch.


You can also execute the procedure from a job and use the notification email to send you an email. This would also give you the side benefit of having execution history.

http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/

And see this post about sending using regular ol' email to send SMS messages.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜