?
Solved

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

Posted on 2004-09-21
7
Medium Priority
?
793 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 10

Accepted Solution

by:
AustinSeven earned 500 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 500 total points
ID: 12113868
hmmm... you probably can ask how this proc was run in the past...

-- cheers
0
 
LVL 43

Assisted Solution

by:Eugene Z
Eugene Z earned 500 total points
ID: 12114535
did you login on QA as 'sa'?
0
 
LVL 3

Assisted Solution

by:mAjKoL
mAjKoL earned 500 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

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…
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.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Suggested Courses

771 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