How do I increase the maximum allowed attachment size for email sent using msdb.dbo.sp_send_dbmail in Microsoft SQL Server 2005/2008

前端 未结 3 708
名媛妹妹
名媛妹妹 2020-12-15 15:50

Symptom: Sending an attachment using msdb.dbo.sp_send_dbmail results in the following error:

File attachment or query results size exceeds allowable value of 100000

3条回答
  •  Happy的楠姐
    2020-12-15 16:11

    To make it with T-SQL you can use one of Database Mail system stored procedures which is used to change configuration settings for Database Mail - sysmail_configure_sp.

    MaxFileSize parameter is used to specify the maximum size of an attachment in bytes. So you can change this value to 10 million bytes with the following line of code:

    EXECUTE msdb.dbo.sysmail_configure_sp 'MaxFileSize', '10000000';
    

提交回复
热议问题