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

Killing a task in SQL Server

Status
Not open for further replies.

sunnyjassal

Programmer
Feb 19, 2003
16
US
I would like to know how to check who and what process is running in the database. For example, lets say if someone or some application is running a query that is causing the database to slow down, I would like to see all tasks that are currently being processed therefore finding the problematic task. How can I view these tasks and how would I kill it?

Thank you for your help in advance.
 
sp_who to get list of processes, kill <spid> to kill process. In addition, Ctrl-1 key in QA is mapped by default to execute sp_who.

EM can do the same, but refresh is pain in the a** (you must click on correct node in EM tree then hit F5).

------
heisenbug: A bug that disappears or alters its behavior when one attempts to probe or isolate it
schroedinbug: A bug that doesn't appear until someone reads source code and realizes it never should have worked, at which point the program promptly stops working for everybody until fixed.

[ba
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top