我们正在使用SQL Server 2008
Database Mail向我们的网站访问者发送电子邮件.我不知道SQL Server是通过从队列中拾取来逐个发送邮件,还是会使用线程以同时方式发送电子邮件.
如果数据库邮件使用线程,有没有办法增加并发运行的线程数?
解决方法
摘自在线书籍:
Database Mail
To minimize the impact on SQL Server,
the component that delivers e-mail
runs outside of SQL Server,in a
separate process. SQL Server will
continue to queue e-mail messages even
if the external process stops or
fails. The queued messages will be
sent once the outside process or SMTP
server comes online.
数据库邮件使用Service Broker技术:
Database Mail provides background,or
asynchronous,delivery. When you call
sp_send_dbmail to send a message,
Database Mail adds a request to a
Service Broker queue. The stored
procedure returns immediately. The
external e-mail component receives the
request and delivers the e-mail.
实际的电子邮件传递由您的SMTP服务器处理,因此这将承担工作负载的冲击,应根据容量/电子邮件流量要求进行配置.