SQL Server Agent domain authentication | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SQL Server Agent domain authentication


Hi There… I have the most peculiar problem. 2 servers (A and B), both member server on AD domain. I want to copy a file from A to B, during job execution, using
"xcopy c:file.txt \Servershare /Y", I get the error "Executed as user: Invalid drive specification 0 File(s) copied. Process Exit Code 4. The step failed." In order to do this A must ask the AD for permission to write to B. I get the error "Invalid drive specification" because the SQL Server Agent user is not authorised by the domain. The problem is that, the SQL Server Agent user, in fact is a domain user, with all the neccesary rights. The user is a member of the Administrator group on both servers (A and B). I have noticed, that when I change the SQL Server Agent LogOn account to LocalSystem, and back to DOMAINUser, it (sometimes) gives the error "Could not determine if User DOMAIN/User has permissions" It is like, it cannot be verified on the domain, but after some 4 retries, til succeeds. I also get these error in the Security eventlog:
"The redirector was unable to initialize security context or query context attributes." "DCOM was unable to communicate with the computer SERVERNAME using any of the configured protocols." maybe these errors are related ?! All I want to do, really, is to copy a file from A to B. It shouldn´t be rocket science… regs, Mads of Denmark

FOllow this KBAhttp://support.microsoft.com/?kbid=834124 to resolve the 8198 errors. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
The tests describes in the arthichle has not yielded any result, an interesting symptom has appeared…. If I log on to Query analyzer using "sa" I am granted access, and can run any query. If log on the server, with the domain users credentials, and afterwards start the Quert analyzer, with "Windows authentication" i get the error "cannot generate SSPI context". This indicates, that the SQL Server cannot contact the DC (for reasons unknown). I think this is the core of the problem..
regs, Mads
Another KBAhttp://support.microsoft.com/?id=811889 to deal the issues. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>