December 12, 2013 at 10:23 am
Very strange one which I cant see a definitive answer for, apologies if its around here already btw
I have a non sys admin user, trying to send mail with an attachment - attachment is not local. When its attempted we receive an access is denied message although if we alter his login to be in the sysadmin role it works fine. It also works fine if we remove the attachment line.
The proxy account is a local admin on the machine where the file resides, all msdb role membership is OK.
Am I missing something?!!?
Many thanks as always
D
'Only he who wanders finds new paths'
December 14, 2013 at 2:55 pm
Maybe the user needs permission to folder where the attachment is located ??
December 14, 2013 at 4:54 pm
You might also setup the database to be owned by "SA" even if (hopefully) the SA account is disabled and then include an EXECUTE AS OWNER in the stored procedure the user is using to send the mail (and I'm not talking about sp_Send_DBMail itself).
If there is no such stored procedure and you're allowing the user to use sp_Send_DBMail directly, I'd have to call that a "security risk" and recommend that you setup such a stored procedure.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 15, 2013 at 7:11 am
Thanks for the replies!
Permissions are set up on the folder and yes Jeff, it is via a stored procedure and sa is disabled too 🙂
'Only he who wanders finds new paths'
December 15, 2013 at 7:46 am
david.alcock (12/15/2013)
Thanks for the replies!Permissions are set up on the folder and yes Jeff, it is via a stored procedure and sa is disabled too 🙂
Good. Does the stored procedure have an EXECUTE AS OWNER and is the owner of the DB "SA"?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 15, 2013 at 8:06 am
You're talking about a proxy account being local admin on the machine holding the file.
So I'd guess you're talking about a SQL agent job. Or am I missing something?
Is it possible to access the remote file using Windows (or the good old DOS prompt)?
My guess would be it's an issue that the user cannot acces the file from outside the local server.
How do you reference the file? Do you use UNC path?
August 29, 2019 at 5:25 pm
How can i sen mail without a sysadmin user?
Sql server throw the following error
[Microsoft][ODBC SQL Server Driver][SQL Server]The client connection security context could not be impersonated. Attaching files require an integrated client login(42000,22051)
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply