Increase database email attachment capacity in SQL Server

Increase database email attachment capacity in SQL Server

We have setup database email in SQL Server for our administrative task. We used to send an email about JOB status, maintenance task, operator alerts etc. We do send some database health statistics report also and it is having attachment as PDF files.

Recently we have moved our databases, job etc. from SQL Server 2008R2 Enterprise instance to SQL Server 2012 Enterprise instance. Everything was working smooth but we suddenly get to know that some of the database statistics email doesn’t comes and it happens after we changed the instance.

Well, it may happens as by default SQL Server can have attachment of 1MB (to be precise 1000000 bytes). Some of our PDF files are having size of 2MB or even 4MB max so obviously we have to increase this default limit of attachment.

Let us see how can we increase this limit.

1.) Connect the SQL Server Instance from SSMS and move to Management | Database Mail, right click on “Database Mail” and click on “Configure Database Mail” menu option.

1SSMSConfigureMail

2.) Select “View or change system parameters” radio button from the popup menu.

2DatabaseMailPropertyPage1

3.) you will find “1000000” value in “Maximum File Size (Bytes)” which is a default limit. I have increased it to “4000000” (4MB) as per my requirement.

3maximumAttachmentFileSize

As soon as I increase the value, click on “Next” and then “Finish” button, I got message for successful update and my alert starts sending bigger PDF files too.

If you like this article, do like “Extreme-Advice” page in Facebook.

Reference: Ritesh Shah

http://Extreme-Advice.com

http://www.sqlhub.com

Note: Microsoft Books online is a default reference of all articles.

2 thoughts on “Increase database email attachment capacity in SQL Server

  1. christi parks

    I am not a programmer but I have this SQL subject this session and have to prepare for it. What all topics should be covered in it?
    And has anyone studied from this course http://www.wiziq.com of SQL tutorial online?? or tell me any other guidance…
    would really appreciate help

Comments are closed.