SQL Currently Running Sessions

Get all current sessions running on sql instance.
SELECT r.session_id, r.status, r.start_time, r.command, s.text, 
r.wait_time, r.cpu_time, r.total_elapsed_time, r.reads, r.writes, r.logical_reads, r.transaction_isolation_level 
,r.* 
FROM sys.dm_exec_requests r 
CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) s

Comments

Popular posts from this blog

Add User As Local Administrator On Domain Controller

Calling Dataverse Web API in PowerShell using Client Credentials

How to Create SharePoint Items with Power Automate Desktop