SQL - Get Connected Hosts

Gets a list of all the connections currently open on SQL
SELECT HOST_NAME, PROGRAM_NAME, wait_resource, 
wait_time, 
wait_type, 
net_transport, 
DMER.session_id,
start_time,
DMES.status,
plan_handle,
auth_scheme,
local_tcp_port,
local_net_address 
 FROM sys.dm_exec_requests DMER
INNER JOIN sys.dm_exec_sessions DMES ON DMES.session_id=DMER.session_id
INNER JOIN sys.dm_exec_connections DMEC ON DMEC.session_id=DMES.session_id

Comments

Popular posts from this blog

Add User As Local Administrator On Domain Controller

How to Create SharePoint Items with Power Automate Desktop

Install/Configure Power Apps Mobile for U.S. Government and DoD User