|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Friday, February 22, 2013 5:31 AM
Points: 22,
Visits: 99
|
|
We moved our production databases from an SQL2008R2 Standard Edition to SQL2012 Enterprise edition this past weekend. I have a DBMailUserRole defined in MSDB that has the execute rights to the sp_send_dbmail stored procedure and the user that is attempting to execute the sp is a member of the role, but I'm still getting this error.
Anyone have any idea what I need to do in order to get this working?
Thanks!
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Yesterday @ 3:29 PM
Points: 45,
Visits: 422
|
|
Firstly, Can you check if dbmail is enable in sys.configurations.
BOL: "Execute permissions for sp_send_dbmail default to all members of the DatabaseMailUser database role in the msdb database. However, when the user sending the message does not have permission to use the profile for the request, sp_send_dbmail returns an error and does not send the message."
eyespi20 (2/18/2013) We moved our production databases from an SQL2008R2 Standard Edition to SQL2012 Enterprise edition this past weekend. I have a DBMailUserRole defined in MSDB that has the execute rights to the sp_send_dbmail stored procedure and the user that is attempting to execute the sp is a member of the role, but I'm still getting this error.
Anyone have any idea what I need to do in order to get this working?
Thanks!
Thanks Jagan K
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Friday, February 22, 2013 5:31 AM
Points: 22,
Visits: 99
|
|
| Yes, the role does have permission to execute the stored procedure sp_send_DBMAIL and the user is a member of the role. DBMail is enabled and a default profile is defined and test messages go through.
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Today @ 10:44 AM
Points: 713,
Visits: 2,863
|
|
eyespi20 (2/18/2013) We moved our production databases from an SQL2008R2 Standard Edition to SQL2012 Enterprise edition this past weekend. I have a DBMailUserRole defined in MSDB that has the execute rights to the sp_send_dbmail stored procedure and the user that is attempting to execute the sp is a member of the role, but I'm still getting this error.
Anyone have any idea what I need to do in order to get this working?
Thanks!
Does the user have a default profile associated ?
Can you post output of below queries and verify if the environment is clustered or not ?
SELECT * FROM msdb.dbo.sysmail_sentitems order by sent_date desc
SELECT * FROM msdb.dbo.sysmail_allitems order by sent_date desc
SELECT * FROM msdb.dbo.sysmail_event_log order by log_date desc SELECT * FROM msdb.dbo.sysmail_unsentitems select * from msdb.dbo.sysmail_configuration
HTH, Cheers !
"Never take life too seriously, nobody gets out of it anyways ! When your love and skills unite, expect a masterpiece !"
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Yesterday @ 3:29 PM
Points: 45,
Visits: 422
|
|
Did you also hook up the mail profile in sqlagent's Alert system tab. I don't think this will have any impact on using dbmail through a procedure. But, worth a try
Thanks Jagan K
|
|
|
|