Solved

Appending attachment using sp_send_dbmail

Posted on 2008-06-25
1
851 Views
Last Modified: 2008-06-25
The email sends, but without the attachment.  Is there a problem with the code or does something need to be manipulated within the SQL Server settings?

msdb.dbo.sp_send_dbmail  @profile_name =  'Test' ,
@recipients = 'bill123453@yahoo.com',
@subject =  'Test' ,
@body =  'Test' ,
@query_attachment_filename =  'C:\Test.txt'
0
Comment
Question by:srejja
1 Comment
 
LVL 8

Accepted Solution

by:
sbagireddi earned 500 total points
ID: 21868578
Database Mail uses the Microsoft Windows security context of the current
user to control access to files. Therefore, users who are authenticated with
SQL Server Authentication cannot attach files using @file_attachments.

Are you authenticated as a SQL user.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now