Abiks järgnev päring
SELECT dm_exec_sessions.session_id, dm_exec_sessions.status
, dm_exec_sessions.login_name, dm_exec_sessions.original_login_name
, dm_exec_connections.net_transport
, dm_exec_connections.connect_time
, dm_exec_sessions.login_time
, dm_exec_connections.protocol_type
, dm_exec_connections.client_net_address
, dm_exec_connections.client_tcp_port
, dm_exec_connections.auth_scheme
, dm_exec_sessions.HOST_NAME, dm_exec_sessions.NT_DOMAIN
, dm_exec_sessions.program_name, dm_exec_sessions.client_interface_name
, dm_exec_sessions.language, dm_exec_sessions.client_version
, dm_exec_requests.command, dm_exec_requests.wait_type, dm_exec_requests.wait_time, dm_exec_requests.wait_resource
FROM sys.dm_exec_sessions
JOIN sys.dm_exec_connections ON (dm_exec_sessions.session_id = dm_exec_connections.session_id )
INNER JOIN master..sysprocesses ON (dm_exec_sessions.session_id = sysprocesses.SPID)
LEFT JOIN sys.dm_exec_requests ON (dm_exec_sessions.session_id = dm_exec_requests.session_id)
WHERE DB_NAME(sysprocesses.dbid) = DB_NAME()
--AND dm_exec_sessions.status != 'sleeping'
dm_exec_sessions.session_id põhjal võib teha KILL sellele ühendusele
dm_exec_sessions.program_name saad seada Web.Config faili ConnectionStringis Application Name parameetriga niimoodi
connectionString="Data Source=SQL2008SERVER;Min Pool Size=2;Application Name=MINURAKENDUS; ...