Solved

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

Posted on 2004-09-21
7
787 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

856 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