sp_send_dbmail error - Attaching files require an integrated client login

  • When using EXECUTE msdb.dbo.sp_send_dbmail and trying to send an attachment, I receive the following error:

    "The client connection security context could not be impersonated. Attaching files require an integrated client login"

    I have to mention that I am running this from a SQL 2008 R2 server, but the attachment I want to send is on a different file server.

    The only way I can currently get passed this, is to make the SQL login a 'sysadmin'. But this is not ideal as the SQL login is used on an application

    and I don't want this type of permission for this login.

    Is there any way around this? What is my alternative?

    The above is on our QA environment - on our Production environment I get a different error:

    "Attachment file \\******.csv is invalid"

    But the file DOES exist and IS valid...

    I need your advise here please - I must send an attachment via a proc - so I have to find a workaround

    Thanks,

  • Probably not what you want to hear, but this is from Books On Line:

    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. Windows does not allow SQL Server to provide credentials from a remote computer to another remote computer. Therefore, Database Mail may not be able to attach files from a network share in cases where the command is run from a computer other than the computer that SQL Server runs on.

  • You can look at the log files and may be you find somethinks what is going to wrong.. I think the same permisons affect that

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply