Solved

Calling xp_cmdshell from st.proc. in QA - Error 'Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Posted on 2004-09-21
7
784 Views
Last Modified: 2008-01-09
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)
and
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???
0
Comment
Question by:kerickson0328
7 Comments
 
LVL 10

Accepted Solution

by:
AustinSeven earned 125 total points
ID: 12113630
Try changing the account to a suitable Windows account instead of a SQL Login.  

AustinSeven
0
 
LVL 9

Assisted Solution

by:miron
miron earned 125 total points
ID: 12113868
hmmm... you probably can ask how this proc was run in the past...

-- cheers
0
 
LVL 42

Assisted Solution

by:EugeneZ
EugeneZ earned 125 total points
ID: 12114535
did you login on QA as 'sa'?
0
 
LVL 3

Assisted Solution

by:mAjKoL
mAjKoL earned 125 total points
ID: 12118285
It looks like your server has NT AUTHORITY\ANONYMOUS LOGON identity. You can add NT AUTHORITY\ANONYMOUS LOGON to your server logins and assign as low permisions as possible to get this done.

HTH
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question