Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 1000000 bytes

How can I increase that value?

like image 661
Sammy Larbi Avatar asked Jun 15 '09 18:06

Sammy Larbi


People also ask

How to increase File attachment size in SQL Server?

Go to the “Select Configuration Task” window; Select the last option to the bottom “View or change systems parameters” and click Next. “Configure System Parameters” window pops up, modify the “Maximum File Size(Bytes)” Parameter to your need. 10000000 (~10MB) did the trick for us.

How do I grant permission to Msdb DBO Sp_send_dbmail?

click on DEFAULT PROFILE and set it to YES. STUDIO > DATABASES > SYSTEM DATABASES > right click on MSDB and select NEW QUERY > then enter > grant execute on sp_send_dbmail to public and click OK.


1 Answers

In the Object Explorer frame of SQL Server Management Studio, expand the "Management" folder. Open the Database Mail configuration wizard.

Click Next-> Choose the radio button for "View of change system parameters" and click Next.

Now change the Maximum File Size (Bytes) property and click Next, then click Finish to save your changes.

See Database Mail Configuration Wizard at MSDN for more info.

like image 177
Sammy Larbi Avatar answered Oct 14 '22 06:10

Sammy Larbi