Aliendreamer

check proccess in sql server

Aug 30th, 2019
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.31 KB | None | 0 0
  1. KILL 1132
  2. GO
  3. SELECT
  4.     p.spid, p.STATUS, p.hostname, p.loginame, p.cpu, r.start_time, t.text
  5. FROM
  6.     sys.dm_exec_requests AS r,
  7.     master.dbo.sysprocesses AS p
  8.     CROSS APPLY sys.dm_exec_sql_text(p.sql_handle) t
  9. WHERE
  10.     p.STATUS NOT IN ('background')
  11. AND r.session_id = p.spid
  12. ORDER BY r.start_time
Advertisement
Add Comment
Please, Sign In to add comment