sql-servercmdkill-processtaskmanagerxp-cmdshell

SQL server how stop process run from xp_cmdshell


i try open folder from my computer by run script in sql server

EXEC xp_cmdshell 'start C:\folder'

it folder not exixt and the process still execute then i do kill process

but it still KILLED/ROLLBACK

what to do now?

help!! michal


Solution

  • Open cmd:

    tasklist /fi "IMAGENAME eq cmd.exe" /fi "SESSIONNAME eq Services" /v

    get the PID of the running session (assuming it is 123456)

    taskkill /PID 123456 /F