I am trying to get a better handle on what processes are using sp_send_dbmail on my SQL 2008 server. I can use the following to identify when an email is sent and what was sent:
select * from sysmail_log order by log_date desc
select * from sysmail_mailitems
The former will give me the spid. How can I resolve the spid to figure out machine host name, user name, application name for the given spid?
View Complete Post