-- What SQL Statements Are Currently Running? SELECT start_time ,'Duration(secs)' = datediff(ss,start_time, getdate()) , [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 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) -- Ignore this current statement. and spid = 55 ORDER BY 1 DESC, 2
创新互联公司从2013年成立,先为东港等服务建站,东港等地企业,进行企业商务咨询服务。为东港企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。
Run the above query against the target server, you can know What SQL Statements Are Currently Running.
网页题目:WhatSQLStatementsAreCurrentlyRunning
网站网址:https://www.cdcxhl.com/article14/ghdhge.html
成都网站建设公司_创新互联,为您提供响应式网站、网站内链、全网营销推广、、建站公司、域名注册
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联