HELP! sp_send_dbmail error


i'm having trouble sending email through dbmail.  i'm logged in a sql login user named "serviceuser".  have added user msdb database , rolemember "databasemailuserrole"

 

 

use [msdb]

go

create user [serviceuser] for login [serviceuser] with default_schema=[guest]

go

use [msdb]

go

exec sp_addrolemember n'databasemailuserrole', n'serviceuser'

go

 

when try send email:

 

exec msdb.dbo.sp_send_dbmail

@profile_name=@databasemailprofiletouse,

@recipients=@emailaddress,

@subject=@subject,

@body=@messagebody,

@mailitem_id=@mymailitem_id output

 

i following error:

 

msg 15404, level 16, state 10, procedure xp_logininfo, line 62

could not obtain information windows nt group/user 'serviceuser', error code 0xffff0002.

 

i executed following on msdb , didn't help:

 

exec sp_changedbowner 'sa'

 

xp_logininfo returns error:

 

exec xp_logininfo 'serviceuser'

 

what wrong???????  help!

 

 

 

my database mail profile not public!  needs public or set private user going access it.


SQL Server  >  SQL Server Tools



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607