RE: EXECUTE permission denied on object 'sp_send_dbmail', database 'ms

If i execute the procedure manually within management studio it works fine,
email is sent and record is updated..

Did you use the same login (to log into the SQL instance) that the web
server was using?


"Daniel" wrote:

Im getting this error when trying to execute my stored procedure that has
code within to email

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

If i execute the procedure manually within management studio it works fine,
email is sent and record is updated..

We have other pages within our site that use similar procedures and they all
work fine.. just dont know why this one isnt..

here is the code within the procedure.. keeping in mind that it works if
manually executed and does NOT if executed from the webpage.

-- send the mail

EXEC msdb.dbo.sp_send_dbmail

@profile_name = 'CESync'

,@recipients = 'dcha@xxxxxxxx'

,@body = @tableHTML

,@subject = 'Credit Memo To Back Out'

,@body_format = 'HTML' ;

ASP, SQL2005, DW8 VBScript, Visual Studio 2005, Visual Studio 2008


Relevant Pages

  • Re: File Upload - Security Issues
    ... uploaded and the user could upload any or all of these in theory. ... There is no one product that can give you 100% security, ... > Code doesn't execute in local memory space unless remote user has rights ... > You don't have MS Office installed on the server. ...
  • Re: System.Security.SecurityException was unhandled
    ... Is it a must that I need to register the COM server to the machine using ... CAS permissions on the client machine, and the COM issue is a new problem. ... assembly actually has the permission in question. ... When I execute the application I received and error message. ...
  • 2nd Post - Trouble Getting VS.Net 2003 WalkThrough working
    ... the server. ... MSDE either from the Setup or from the SQL2KDeskSP3 execute. ... it does look like some of the sample databases have been ... >> and they directed me to install MSDE and they attached a ConfigSamples ...
  • Re: IIS 6.0 on Windows Server 2003
    ... If PHP insists on using CMD.EXE to execute the shellcommand on the ... server, then no, you have no choice -- you must give read permissions to the ... this would be a security vulnerability caused by PHP. ...
  • Re: How to launch a Windows application from a ASP.Net web applica
    ... It can execute Java, ActiveX, and JavaScript, and maybe a few other things. ... The only reason your program has been somewhat successful is because your client and server are on the same machine. ... programs I knew how to create a batch file program already. ... When using ClickOnce it creates/deploys the Windows application from ...