Our SQL server is upgraded from SQL7 to SQL2000 on Window2000, SQLMail is working fine without using @query, for example, the below code works.
master..xp_sendmail
@Subject='TEST',
@ receipts='HHua@abc.com'
However, if I use @query, which has a simple select statement, for example
master..xp_sendmail
@Subject='TEST',
@ receipts='HHua@abc.com',
@query = ....
I get error,
...DomainUser\DomainAdmin can not login SQL server...
(DomainUser\DomainAdmin-it is our window domain admin account which starts SQL server and SQLagent, but in SQL login, we deny this account, like "Guest" account)
It is very strange, we have another SQL2000 server, in sql login,we also deny window domain account, the same code works fine in this server and the old SQL7 server.
Does anyone have any idea about this issue?
Thanks in advance!!!
master..xp_sendmail
@Subject='TEST',
@ receipts='HHua@abc.com'
However, if I use @query, which has a simple select statement, for example
master..xp_sendmail
@Subject='TEST',
@ receipts='HHua@abc.com',
@query = ....
I get error,
...DomainUser\DomainAdmin can not login SQL server...
(DomainUser\DomainAdmin-it is our window domain admin account which starts SQL server and SQLagent, but in SQL login, we deny this account, like "Guest" account)
It is very strange, we have another SQL2000 server, in sql login,we also deny window domain account, the same code works fine in this server and the old SQL7 server.
Does anyone have any idea about this issue?
Thanks in advance!!!