Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Database mail with @query issue! Expand / Collapse
Author
Message
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, January 14, 2016 2:07 PM
Points: 1,375, Visits: 843
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
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 4, 2016 9:07 AM
Points: 11, Visits: 313
Thank you bensala.
Post #1447919
Posted Wednesday, September 9, 2015 12:59 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 23, 2015 11:51 AM
Points: 2, Visits: 132
I had a similar issue and the solution was just to make sure the @query_result_width had a value (250).
Post #1718197
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse