Sql-server – Any correlation between tempdb and sysmail

sql server

Is there any correlation between [tempdb] getting full and subsequently db_mail disabled ? [This needs sysmail_start_sp to be executed in msdb]

Best Answer

Yes there is correlation between tempdb and db_mail.

Ref: https://technet.microsoft.com/en-us/library/ms345368(v=sql.105).aspx

Database mail user service broker which in turn use tempdb.

Service Broker helps developers build asynchronous, loosely coupled applications in which independent components work together to accomplish a task. These application components exchange messages that contain the information that is required to complete the task. Service Broker explicitly uses tempdb for preserving existing dialog context that cannot stay in memory. The size is approximately 1 KB per dialog. Also, Service Broker implicitly uses tempdb by the caching of objects in the context of query execution, such as work tables that are used for timer events and background delivered conversations.

Database Mail, Event Notifications, and Query Notifications implicitly use Service Broker.