Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have an SQL Server 2012 instance running under a managed service account. I've configured database mail with one account and am trying to send a test email, but I'm getting some errors in the server's event logs:

Database Engine Instance=MYINSTANCE;Mail PID=2132;Error Message:The update to the database failed. Reason: The EXECUTE permission was denied on the object 'sysmail_logmailevent_sp', database 'msdb', schema 'dbo'.

Database Engine Instance=MYINSTANCE;Mail PID=2212; Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException Message: The read on the database failed. Reason: The EXECUTE permission was denied on the object 'sp_readrequest', database 'msdb', schema 'dbo'. Data: System.Collections.ListDictionaryInternal TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Objects.QueueItem GetQueueItemFromCommand(System.Data.SqlClient.SqlCommand) HelpLink: NULL Source: DatabaseMailEngine

If I make the account running the SQL Server process a sysadmin, this error goes away, and mails send successfully. However, all the research I've done suggests that giving this account the DatabaseMailUserRole role in the msdb database should be sufficient. I've done this and still receive the same errors.

I took a look in the BOL but couldn't find anything.

share|improve this question
    
Is sql server and sql agent running under the same account ? –  Kin Feb 20 at 20:12
    
@kin No, separate accounts (both managed service accounts). –  Mansfield Feb 20 at 20:18
    
can you try to run SQL Agent with the same service account as sql server - just to rule it out and check if that works ? –  Kin Feb 20 at 20:32
    
@Kin That has sysadmin permission, so it will work. I've given my main service account sysadmin permission for now and everything is working - I'm just curious to know if that's too much. –  Mansfield Feb 20 at 20:47
    
SQL Agent needs a sysadmin privilege –  Kin Feb 20 at 20:51

1 Answer 1

up vote 2 down vote accepted

SQL Server Agent service account requires sysadmin permissions on the instance.

Microsoft KB

share|improve this answer
    
I figured. Thanks! –  Mansfield Feb 21 at 13:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.