发送 SQL Server 代理作业失败的摘要

发布于 2024-08-13 16:06:56 字数 113 浏览 4 评论 0原文

SQL Server 代理允许您在作业成功或失败时创建通知,但我想创建一个定期通知,为那些从服务器维护中删除的用户发送事件摘要。

有没有办法设置摘要通知来详细说明过去 24 小时内哪些作业失败了?

SQL Server Agent allows you to create Notifications at the moment a Job succeeds or fails, but I'd like to create a regular notification that sends a summary of the events for those who are one step removed from server maintenance.

Is there a way to setup summary notifications that spell out which jobs failed over the last 24 hours?

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

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

发布评论

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

评论(1

等数载,海棠开 2024-08-20 16:06:56

您可以使用多个系统存储过程,或者可以直接针对系统表进行查询。如果您有可用的 SSRS,则可以使用这些查询汇总一份报告,您可以按需提供该报告,也可以安排在适合您的任何时间将其通过电子邮件发送给必要的人员。

具体来说,请查看 msdb 中的 sp_help_jobhistorysp_help_jobhistory_full

如果您无法使用 Google 找到设置此功能的演示,我会感到惊讶。

There are several system stored procedures that you might be able to use or you could query directly against the system tables. If you have SSRS available then put together a report using those queries and you can have it on-demand or scheduled to be emailed to the necessary people at whatever time is right for you.

Specifically, check out sp_help_jobhistory and sp_help_jobhistory_full in msdb.

I'd be surprised if you couldn't use Google to find a demo of setting this up.

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