Avatar of Alex A
Alex A
 asked on

SQL Server: error when using sp_send_dbmail

msdb.dbo.sp_send_dbmail 


Msg 22050, Level 16, State 1, Line 27
Failed to initialize sqlcmd library with error number -2147467259.


why can't I send email using sp_send_dbmail  ?

how to add myself to existing @profile_name ?


Thank you.





Microsoft SQL Server

Avatar of undefined
Last Comment
Alex A

8/22/2022 - Mon
Pavel Celba

Does your user have access rights to the msdb ?  Look at the datbase - Security - Users and check whether your user has "DatabaseMailUserRole" and "db_owner" under "Membership" and also have Alter, Control and Execute for the stored procedure created to send the mail.

ASKER CERTIFIED SOLUTION
Peter Chan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Alex A

ASKER
thanks
Your help has saved me hundreds of hours of internet surfing.
fblack61