2

When I was running some cmd through xp_cmdshell in sql server it tooks long time to execute.So I have killed the session.But it stucks in KILLED/ROLLBACK state for long time.Its a standalone production server.I cant restart this server.Is this a performance issue? Is there any way to clear that session?

SujithTee
  • 125
  • 2
  • 3
  • 12

1 Answers1

2

Kill the windows process linked to xp_cmdshell and if it does not rollback I guess the only solution will be to restart the instance.

Hybris95
  • 2,286
  • 2
  • 16
  • 33
  • Any way to do this programatically within SQL? IE have an agent job that automatically kills a windows process if its been stuck in that state for more than x minutes? – Geoff Griswald Jan 21 '20 at 09:33
  • There may be, but actually asking your system administrator would be the best bet – Hybris95 Jan 22 '20 at 09:24
  • How to protect against a process run from xp_cmdshell remaining in KILLED/ROLLBACK state forever? - https://stackoverflow.com/questions/59838503/how-to-protect-against-a-process-run-from-xp-cmdshell-remaining-in-killed-rollba – Geoff Griswald Feb 03 '20 at 17:03