Advertisement
Lars-UT

sp_whoisactive - syntax example

Jul 2nd, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.53 KB | None | 0 0
  1. EXEC sp_whoisactive --@show_sleeping_spids=2,
  2. --@filter = 'DOMAIN\username', @filter_type = 'login', --only this login
  3. --@not_filter = 'IGNORETHISHOSTNAME', @not_filter_type = 'host',  --exclude this host
  4. --@not_filter = 'DOMAIN\username', @not_filter_type = 'login',     --exclude this login
  5.    @output_column_list = '[dd%][session_id][percent_complete][sql_text][blocking_session_id][login_name][host_name][database_name][program_name][start_time][wait_info][cpu%][%]',
  6.    @sort_order = '[start_time] ASC'
  7. --@sort_order = '[sql_text] ASC'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement