In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
-- 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_domainFROM sys.dm_exec_requests erINNER JOIN sys.sysprocesses sp ON er.session_id = sp.spidCROSS APPLY sys.dm_exec_sql_text (er.sql_handle) as qtWHERE session_Id > 50-Ignore system spids.AND session_Id NOT IN (@ @ SPID)-- Ignore this current statement.and spid = 55ORDER BY 1 DESC, 2
Run the above query against the target server, you can know What SQL Statements Are Currently Running.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.