select [spid] = session_id ,ecid ,[database] = db_name(sp.dbid) ,[user] = nt_username ,[status] = er.status ,[wait] = wait_type ,[individual query] = substring(qt.text, er.statement_start_offset / 2, ( case when er.statement_end_offset = - 1 then len(convert(nvarchar(max), qt.text)) * 2 else er.statement_end_offset end - er.statement_start_offset ) / 2) ,[parent query] = qt.text ,program = program_name ,hostname ,nt_domain ,start_time from sys.dm_exec_requests er inner join sys.sysprocesses sp on er.session_id = sp.spid cross apply sys.dm_exec_sql_text(er.sql_handle) as qt where session_id > 50 /* ignore system spids.*/ and session_id not in (@@spid)
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....