SQL Server Development Bookmark and Share   
 index > Getting started with SQL Server > EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'
 

EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'

I could not find a sub-forum for SQL Server to which this applies, so I would welcome any suggestions as to where to post it.

Here is the problem: I have a VB.Net 2008 solution that sends an XML string to another agency. The data reaches the other agency, but I get the following error message:

System.Web.Services.Protocols.SoapException: Server was unable to process request. --> The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at CrimNetCLGrandJury.PCSCAgave.GJFeed.Send(String xmlFeed)

at CrimNetCLGrandJury.FeedControl.CreateFeed_Click(Object sender, EventArgs e)

We do not use the sp_send_dbmail stored proc at all.


Thanks!

Joe15  Monday, October 27, 2008 11:38 PM
You need to grant execute permission for that sp to the login which tries to execute the sp.

Use msdb
go
Grant EXEC on sp_send_dbmail to user

- Deepak

Deepak Rangarajan  Tuesday, October 28, 2008 12:45 AM

You can use google to search for other answers

Custom Search

More Threads

• "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection"
• Upgrading from SQL 2000 to SQL 2005
• system databases autogrowth
• Trigger content. please help
• SQL Server 2008 - cant login using management studio
• How to find a stored procedure
• Temp Table Data
• List of existing logins
• Interview question
• Confused about CAL's - Question for an internet facing website