I have recently implemented an Agent Job which checks SQL Server every 10mins for any long running queries and if detected it will send out a mail to recipients with the information. However since putting this in, I notice alot of the below query and wonder if this is something I should be concerned about:
WAITFOR(RECEIVE conversation_handle, service_contract_name, message_type_name, message_body FROM ExternalMailQueue INTO @msgs), TIMEOUT @rec_timeout
Run Code Online (Sandbox Code Playgroud)
从数据库邮件中了解它,等待信息是 (1x: 62093ms)BROKER_RECEIVE_WAITFOR 但我是否需要担心或只是将其从警报中排除。
通过 sp_whoisactive 查看可以看到 open_transaction 计数为 1,状态为挂起。
任何帮助表示赞赏。
有没有一种好的方法可以确定在给定的时间段内 sql server(sql 通知 + 应用程序对 sp_send_dbmail 的调用)发送了多少电子邮件?需要此信息进行计费讨论。
SQL Server 2014