I am having similar problems - I just added the (missing) DatabaseMailUserRole using the example provided. Now I am trying to execute the code in the 'troubleshooting' box
sp_addrolemember @rolename = "DatabaseMailUserRole', @membername = "administrator" (i'm trying to use the administrator email account).
Now I get the error "User or role 'administrator@avnnb.ca' does not exist in this database." Just what exactly am I supposed to use as membername I can't find a tiny bit of documentation to help me in this regard.
Database Mail
slbteam08
you only need the role in the msdb database in order to send mails.
HTH, Jens Suessmeyer.
---
http://wwww.sqlserver2005.de
---
gireddy
sp_addrolemember @rolename = "DatabaseMailUserRole',
@membername = "administrator" (i'm trying to use the administrator email account).
Now I get the error "User or role 'administrator@avnnb.ca' does not exist in this database." Just what exactly am I supposed to use as membername I can't find a tiny bit of documentation to help me in this regard.
Husnok
Jens,
Thanks very much. I think everything is setup now.
Regards,
Dan Holsonback
Infosteo
BpBonnett
Thanks for the reply.
I was able to add the role using your script and added a user with the following script -
sp_addrolemember @rolename = 'DatabaseMailUserRole',
@membername = '<user name>'
However, it only added the role to the default database. Is there a way to make this a server role that shows up for each database
Thanks for your help. I'm sure glad there are smart people in the world.
Rob R
mhmm, strange thing, but use this script to recreate the Role:
IF
NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'DatabaseMailUserRole' AND type = 'R')CREATE
ROLE [DatabaseMailUserRole] AUTHORIZATION [dbo]HTH, Jens Suessmeyer
---
http://www.sqlserver2005.de
---