Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
coldfiretech
Starting Member
30 Posts |
Posted - 2009-04-12 : 12:35:17
|
| Hello I am calling a stored procedure from my asp.net site and its throwing this error"EXECUTE permission denied on object 'sp_send_dbmail', database 'msdb', schema 'dbo'."I can execute the sp from SSMS with no problems, the email sends no problems.Any ideas how to fix this?Sucess comes before work only in the dictionary. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-04-12 : 12:50:53
|
| does the service account used by application have access to execute sp_send_dbmail procedure? |
 |
|
|
coldfiretech
Starting Member
30 Posts |
Posted - 2009-04-12 : 12:52:48
|
| not sure what you mean.. im a complete rookie... how do i give someone access to it?Sucess comes before work only in the dictionary. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-04-12 : 13:40:24
|
| just run a profiler trace and check what account its using while your run from application. then check in sql mgmnt studio whether that account has rights to execute sp_send_dbmail. if not, give it |
 |
|
|
coldfiretech
Starting Member
30 Posts |
Posted - 2009-04-12 : 13:51:45
|
| i just added a user to the msdb database, and executed this codeUSE msdbGRANT EXECUTE ON sp_send_dbmail TO cellsaviorit executed okay but it still gives me an error... the user cellsavior has dbo_owner set as role and schemas owned ... Sucess comes before work only in the dictionary. |
 |
|
|
coldfiretech
Starting Member
30 Posts |
Posted - 2009-04-12 : 14:07:10
|
| i got it working nowSucess comes before work only in the dictionary. |
 |
|
|
|
|
|