我已經生成一個製表符分隔文本文件,並使用msdb.dbo.sp_send_dbmail學生作爲附件列表發送電子郵件的程序。當作爲SSIS包運行由sp_db_sendmail發送多封電子郵件
當我執行thoruhg SQL Server Management Studio中的程序,它會發送只有一個電子郵件。 但我創建了一個SSIS包,並安排工作每晚運行。這項工作將4份電子郵件發送給每個收件人。
EXEC msdb.dbo.sp_send_dbmail @profile_name = 'A'
,@recipients = @email_address
,@subject = 'Error Records'
,@query = 'SELECT * FROM ##xxxx'
,@attach_query_result_as_file = 1
,@query_attachment_filename = 'results.txt'
,@query_result_header = 1
,@query_result_width=8000
,@body = 'These students were not imported'
我已經將以下參數設置爲0(在數據庫郵件配置嚮導中),以查看它是否有任何區別。但它沒有解決問題。 AccountRetryAttempts 0 AccountRetryDelay 0 DatabaseMailExeMinimumLifeTime 0
有什麼建議?