Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sp_send_dbmail

Status
Not open for further replies.

JSHoltsIT

IS-IT--Management
Apr 12, 2007
66
US
I have a trigger running on a table that contains customer info. When payment terms are changed, the trigger fires to send a message to a couple of people.

I am having problems with sp_send_dbmail permissions. If I assign a single user access to msdb and assign that single person the DatabaseMailUserRole the trigger fires and sends the email. Interestingly enough, I do not have to grant access to the single user to use the mail profile in order for the single user to execute the trigger sans error.

But, if I grant the same permissions to a group, the trigger fails

Err msg in application:

Unhandled database exception:
A save operation on table '<table name>' failed accessing SQL data.

I've narrowed this to sp_send_dbmail by commenting out the mail code and as I did have success with a single user.

I have granted my group both access to msdb/DatabaseMailUserRole and granted execute rights to the group under msdb sercurity.

Our ERP talks to SQL, so no end users have access to queries.

Any assistance would be greatly appreciated. I really do not want to grant access to all of our users individually.

Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top