SQL Server 2008 R2 Standard x64

I can't send e-mail from this SQL Server (out of MANY that are configured pretty much identically AFAIK). I have created the mail profile and account. However, any time I tried to send an e-mail with sp_send_dbmail (with my account - in sysadmin role) or Database Mail->"Send Test E-Mail", nothing happens. Nothing goes into sysmail_log. The SQL Server error below is generated:

 The activated proc '[dbo].[sp_sysmail_activate]' running on queue 'msdb.dbo.ExternalMailQueue' output the following:  'The EXECUTE permission was denied on the object 'xp_sysmail_activate', database 'mssqlsystemresource', schema 'sys'.'


  • msdb.dbo.sysmail_mailitems has a record for each mail
  • The database mail log is empty (msdb.dbo.sysmail_log)
  • msdb.dbo.sysmail_sentitems is empty
  • I have run sysmail_stop_sp and sysmail_start_sp
  • "is_broker_enabled" is set to "1" in msdb

How is the execute permission denied when I am part of the sysadmin role? Any suggestions on what could be happening?

  • What's the exact version of the instance?
    – Jon Seigel
    Mar 4, 2013 at 18:59
  • For grins did you try GRANT EXEC ON schema::sys to [your_login_name];? Mar 4, 2013 at 19:02
  • Version 10.50.2500. Also, I tried GRANT EXEC ON schema::sys to [your_login_name]; No luck there.
    – SomeGuy
    Mar 4, 2013 at 19:10

2 Answers 2


You aren't the one getting the error, the activated stored procedure is. That procedure is running under a different account than yours.

By default that procedure will run as what ever account is setup as the dbo of the msdb database, unless someone changed it of course. Best guess is that the account which is dbo of the msdb database isn't a member of the sysadmin fixed server role, or the activation principal of that queue has been changed (querying sys.service_queues will tell you this).

  • 1
    That was exactly the issue. I changed the owner of msdb to sa, and all the e-mails starting sending. Good catch and thanks!
    – SomeGuy
    Mar 5, 2013 at 16:10

I have received the same error like below.

The EXECUTE permission was denied on the object 'xp_sysmail_activate', database 'mssqlsystemresource', schema 'sys'.'

I have resolved it on my machine, please check the below things.

Please check the owner of dbo in msdb database. Verify if the login mapped to dbo user is a member of sysadmin fixed server. If not add the login to sysadmin role and try sending the test mail again.

Check for any error in the application log and view database mail log.

Thanks, Pramodkumar.

  • 2
    you are answering the question from March 4 2013 --> 2+year old. If you look at the accepted answer, its exactly the same. I am not sure how your answer adds value since this question is already answered and accepted by OP.
    – Kin Shah
    Sep 4, 2015 at 0:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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