March 18, 2004 at 1:03 pm
Please Help!! I have been successfull using xp_sendmail with basic @recipient and @message arguments, but when I try to add results of a query, it fails every time with:
xp_sendmail: Unable to login to SQL Server.
ODBC error 18456 (28000) Login failed for user 'DOMAINNAME\Username'
I've given this 'DOMAINNAME\Username' full sysadmin/dbo rights.
I am trying this from query analyzer if that makes any difference.
I've searched and searched and can't find what I'm missing.
Any help would be much appreciated.
Thanks,
Nicole
March 18, 2004 at 1:16 pm
Are you running the xp_sendmail from a Job?
Can you post the code you used?
March 18, 2004 at 1:29 pm
I have tried lots of different combinations of code, but here is a simple example that I can't even get to work:
I run this from Query Analyzer:
EXEC xp_sendmail 'nkelly@...', @query = 'sp_configure'
Results:
Server: Msg 17969, Level 16, State 1, Line 0
xp_sendmail: Unable to login to SQL Server.
ODBC error 18456 (28000) Login failed for user 'DomainName\Username'
This works however:
EXEC xp_sendmail 'nkelly@...', @message = 'sp_configure'
Results:
Mail sent.
November 15, 2004 at 9:34 am
Have you resolved your issue?
I have the same problem. Could you let me know if you have solution.
Thanks!
Jie Ma
November 15, 2004 at 9:39 am
I have never gotten sendmail to work with a query. I am assuming there is a security issue that I'm missing, but it seems like I tried everything.
I had given up on this and put it on the back burner...
But if you figure it out or anyone has any suggestions, that would be great!!
Thanks and sorry I wasn't any help!
~Nicole
November 19, 2004 at 2:19 pm
I found the answer.
If you set deny permission on build in Administrator, and then the account you use to login SQL services has local/domain admin right, you will get this message in SQL 2000, but not in SQL 7.0.
Jie Ma
March 15, 2005 at 4:23 pm
Jie Ma,
Could you please explain your answer a little more clearly. I don't quite understand what you are saying to do.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply