Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. --Use sp_who to determine which session(s) are in "suspended" mode (waiting for I/O or taking for-fucking-ever)
  2. use AdventureWorks2014;
  3. go
  4. exec sp_who;
  5. go
  6.  
  7. --Query the session in question and see what the cocksucker has executed
  8. DECLARE @sqltext VARBINARY(128)
  9. SELECT @sqltext = sql_handle
  10. FROM sys.sysprocesses
  11. WHERE spid = (56) --56 was the session in question
  12. SELECT TEXT
  13. FROM sys.dm_exec_sql_text(@sqltext)
  14. GO
  15.  
  16. --Kill the session causing the problem
  17. kill 56;
  18. go
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement