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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xp_cmdshell taskkill 'Access denied'

Status
Not open for further replies.

magicmushroom

Programmer
Nov 21, 2000
8
GB
Hi - I'm running SS2005 on 2003. I'm tring to use xp_cmdshell to run 'taskkill' to kill a process. I keep getting 'Access denied'. The SQL account that is running xp_cmdshell is in the server admin group. If I log on using that account I can kill the process using command prompt.

Interestingly, if I run the process via xp_cmdshell ( i.e. exec xp_cmdshell 'c:\foo.exe' ) I can kill it using exec xp_cmdshell 'taskkill /F /IM foo.exe'.

I can't fathom this behaviour. Can anyone assist?

thanks - M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top