I just double checked the permissions on the proxy account. They are sys admins. I also checked the exec for xp_cmdShell, but it still doesn't help. I get the same error message.
Thanks,
Mike
Main Topics
Browse All TopicsHello,
I've been at this for a few hours now and am making little to no progress.
I'm running SQL Server 2000 and have a procedure that uses the command xp_cmdShell. Everything is great as long as you are a sys admin. I can't figure out how to make it work for non sys admins. I have created a proxy account, unchecked the checkbox on the SQL Agent properies window for only allowing sys admins to run commands, but still doesn't work.
Here is what I am doing to test for a non sys admin.
I have setup the proxy account and verified with the 'get' option.
using QA logged in as a non sys admin.
tried to execute
EXEC master.dbo.xp_cmdshell 'dir c:\*.*'
but it failed with the following message.
Msg 50001, Level 1, State 50001
xp_cmdshell failed to execute because LogonUserW returns error 1326. please make sure the service account SQL Server running under has appropriate privilege. For more information, search Book Online for topic related to xp_sqlagent_proxy_account.
Could someone help get me through this? I have read books online and read every EE article with 'xp_sqlagent_proxy_account
Thanks in advance,
Mike (aka Data-Man)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I couldn't find a solution from the EE experts. Nothing seemed to work.
What we ended up doing was creating a job that runs as an admin every 5 mins and processes requests from the users. They couldn't run xp_cmdShell, but the admin can. Not the best solution, but it's back up and running.
We are also exploring the possibility of creating an admin account for use with each client. The frontend would connect using that account when procs requiring admin status are called. Requires modification to the frontend application, but is a cleaner solution as it doesn't have the 5 min lag time.
Thanks,
Mike
Business Accounts
Answer for Membership
by: rickchildPosted on 2008-08-13 at 01:37:03ID: 22220005
You may need to GRANT xp_cmdshell or EXEC to the account you used for the proxy.