DBMail Attachment transfer failed

We are unable to send an excel file as attachment using dbmail.

EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Atlanta Automated Email Notification',
@recipients =  'myemailaddress@mydomain.gov',
@body = 'just testing',
@subject = 'e4345 Pending for PC5',

The above script results in

"Msg 22051, Level 16, State 1, Line 0
Attachment transfer failed. Please see event log for more information."

However, we can send a different excel file with exact same script (just change file name to e4345pc1.xls) in the same folder with no problems (mail queued). Files have same permissions; only difference is that the first file is 1296 KB and the 2nd is 219 KB. However, the databasemail is configured for max file size of 7,000,000, well above 1296 KB.

Any ideas on how to get this to work?

more ▼

asked Mar 24, 2010 at 11:07 AM in Default

avatar image

11 1 1 1

whats in the event log??

Mar 24, 2010 at 11:28 AM Fatherjack ♦♦

Source SQLAgent$SQL2005 Category Alert Engine Event 3221225794 Message The data portion of event 17052 from MSSQL$SQL2005 is invalid. Source MSSQL$SQL2005 Category Server Event 1073758876 Message The description for Event ID '1073758876' in Source 'MSSQL$SQL2005' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event:'Severity: 16 Error:0, OS: 0 [Microsoft][SQL Native Client]Memory allocation failure'

Mar 24, 2010 at 11:49 AM JennyDBAAtl

and both files are not locked (i.e. opened) by anyone?

Mar 24, 2010 at 02:08 PM Kev Riley ♦♦

No it's not locked; since posting yesterday, we have changed the file attachment to a csv file (268 kb) instead of xls and we're now able to send the attachment.

Mar 25, 2010 at 12:33 PM JennyDBAAtl
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

Similar issue described here on MSDN forums.

May be worth opening a case with MS support, to track down the memory issue for your scenario?

more ▼

answered Mar 24, 2010 at 02:20 PM

avatar image

Kev Riley ♦♦
66.8k 48 65 81

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Mar 24, 2010 at 11:07 AM

Seen: 4276 times

Last Updated: Mar 24, 2010 at 11:37 AM

Copyright 2018 Redgate Software. Privacy Policy