SQL SERVER – Database Mail 檢視發送紀錄指令

–查看所有傳送Mail的傳回的錯誤訊息
SELECT * FROM msdb.dbo.sysmail_event_log;
–PS.有可能某個Mail有錯誤訊息,但系統會重新發送,對於該Mail而言是成功發送的

–查看所有傳送Mail的資料,包含主旨、寄件者、收件者、CC、BCC等
SELECT * FROM msdb.dbo.sysmail_allitems;
–PS.可以用sysmail_event_log的「mailotem_id」到sysmail_allitems找出發送失敗的內容

–查看所有傳送成功的Mail
SELECT * FROM msdb.dbo.sysmail_sentitems;

–查看所有傳送失敗的Mail
SELECT * FROM msdb.dbo.sysmail_faileditems;

by mhchen15 on 16 1 月, 2013 in SQL SERVER, 資料庫 - Tags:
Tags:

There are no comments.

Name*: Website: E-Mail*:
XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>