Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem executing xp_cmdshell 1

Status
Not open for further replies.

Pet35

Technical User
Aug 23, 2004
5
HU
Hello.

I try to run the following simple query in MSDE2000:

DECLARE @RC int
EXEC @RC = master..xp_cmdshell 'dir *.txt'

When I connect as 'sa', it's runs OK. But, if I connect as a different user (db owner), the following error message appears:

Msg 50001, Level 1, State 50001
xpsql.cpp: Error 997 from GetProxyAccount on line 472

Any comments welcome!

(I'm a beginner, so please be patient .)
 
I think you have most of the clues.. when you run it as sa then it works....

The problem is with your command proxy account.. It doesn't have permissions. If the user logs on as sa or some other sysadmin.. No problem.

The following steps should fix this (about 99% certain)

goto Enterprisemanager
select yourserver
select management
select sqlserver agent
select properties
select JobSystem tab
DeSelect Only users with SysAdmin privileges can execute CMDExec and ActiveScripting JobSteps

Then I think it is "Reset Proxy Account" and "Reset Prozxy account"


Hope that helps

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top