执行查询后发送邮件或短信

发布于 2024-09-29 05:22:19 字数 191 浏览 0 评论 0原文

目前我正在处理一个大型数据集,一些查询正在执行几个小时。与此同时,我正在做其他事情。为了有效地利用时间,我一直在考虑实现查询完成后发送电子邮件或短信的逻辑,以便我可以分析数据。

我知道如何通过编写自定义应用程序来做到这一点,但如果已经存在任何类似的解决方案,我不想重新发明轮子。你们中有人知道是否已经存在可用于此目的的通知系统吗?

谢谢

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 exists any notification system that could be used for this purpose?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜无邪 2024-10-06 05:22:19

SQL Server 内置了 sp_send_dbmail。您可以将其作为最后一步运行您的批次。

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

旧街凉风 2024-10-06 05:22:19

您还可以从作业中执行该过程,并使用通知电子邮件向您发送电子邮件。这也将为您带来拥有执行历史记录的附带好处。

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

并参见这篇文章关于使用常规电子邮件发送短信。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文