Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase «««123

Database mail with @query issue! Expand / Collapse
Posted Thursday, November 10, 2011 5:45 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, August 20, 2015 1:28 PM
Points: 1,362, Visits: 825
bensala (4/2/2009)
the issue is with your SQL service not able to "lookup" the AD account... Here is the cmd that DBMail runs:

EXEC sys.xp_logininfo
@acctname = 'Domain\User'

If this command kicks back an error... your dbmail is going to fail. There is an option in AD to hide a user to prevent someone from being able to list all the AD users. If this option is enabled for the user in question... DBMail will fail. MS knows about this issue and as far as I know... has no intention of fixing it.

The first thing to check if you get this error is most likely to check that the accounts SQL is running under has not been disabled. At least that is what I found to be the problem.

Could send emails without the query, as soon as I added the query and set it to include result as file, it bombed with the error above. I did not try with result set included in the body of the email.
Post #1203881
Posted Tuesday, April 30, 2013 2:20 AM


Group: General Forum Members
Last Login: Yesterday @ 7:17 AM
Points: 10, Visits: 208
Thank you bensala.
Post #1447919
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse