Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SQL Server 代理允许您在作业成功或失败时创建通知,但我想创建一个定期通知,为那些从服务器维护中删除一步的人发送事件摘要。
有没有办法设置摘要通知,说明过去 24 小时内哪些作业失败了?
您可以使用几个系统存储过程,也可以直接针对系统表进行查询。如果您有可用的 SSRS,则使用这些查询整理一份报告,您可以按需或安排在适合您的任何时间通过电子邮件将其发送给必要的人员。
具体来说,请查看msdb 中的sp_help_jobhistory和sp_help_jobhistory_full。
如果您无法使用 Google 找到设置演示,我会感到惊讶。