December 12, 2006 at 8:44 pm
I am trying to use xp_SendMail to send a mail with a query and attach results=true and I am getting "xp_sendmail: failed with operating system error 80".
I can send an email using xp_sendmail with attachment (@attachments option) but if I use query and attach results=true it will come up with xp_sendmail: failed with operating system error 80 error message.
This used to work before.
my os win2000 server+sql 2000(sp4)
December 12, 2006 at 11:43 pm
Check for any security changes...
Did you try restarting sql mail?
Final option will be restarting sql.
MohammedU
Microsoft SQL Server MVP
December 13, 2006 at 12:10 am
I have not made any changes to this server.
I have restarted the server but the problem still existed.
thks
December 13, 2006 at 12:29 am
where is your query outputting too. check f ur sql server has permission to write to that path. it must be a permission problem with windows file and folder. check that.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
December 13, 2006 at 12:52 am
maybe it is permission problem, i have tested and found:
1) get error
EXEC xp_sendmail @recipients = 'my@mail.com',
@query = 'SELECT * FROM INFORMATION_SCHEMA.TABLES',
@subject = 'SQL Server Report',
@message = 'The contents of INFORMATION_SCHEMA.TABLES:',
@attach_results = 'TRUE', @width = 250
2) no error
EXEC xp_sendmail @recipients = 'my@mail.com',
@query = 'SELECT * FROM INFORMATION_SCHEMA.TABLES',
@subject = 'SQL Server Report',
@message = 'The contents of INFORMATION_SCHEMA.TABLES:',
@attach_results = 'false', @width = 250
3) no error
EXEC xp_sendmail @recipients = 'my@mail.com',
@attaches='c:\test.txt', @subject = 'SQL Server Report',
@message = 'The contents of INFORMATION_SCHEMA.TABLES:',
@width = 250
how can i solve it ?
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply