I get an error running xp_cmdshell from a stored procedure in Query Analyzer:
'Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
I have tried running the sproc from Query Analyzer:
exec master..xp_cmdshell 'dtsrun /S<server1> /Ncopy_control /E' (the way we usually do it)
exec master..xp_cmdshell 'dtsrun /S<server1> /Ncopy_control /Usa /Ppassword' (which looks like it should work)
sa IS in the sysadmin role. copy_control is a DTS package on <server1> that copies records to <server2>.
Could the error be due to fact I'm accessing 2 servers w/the same login? sa has same password on both servers.
This T-SQL script actually gets executed in a DTS package, but I want to run it from Query Analyzer.
What am I missing???