SELECT t1.session_id
,
t2.text
,
t1.[status]
,
t1.blocking_session_id
,
t1.cpu_time
,
t1.total_elapsed_time
FROM sys.dm_exec_requests t1
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS t2
Monday, October 8, 2012
Get current queries executing on SQL Server
at 6:58 AM
Labels: DBA Tasks, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server Tip, SQL Tips, T-SQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment