====== Microsoft - Microsoft SQL Server - SQL - Session - Get Session Info ====== SELECT conn.session_id, host_name, program_name,nt_domain, login_name, connect_time, last_request_end_time FROM sys.dm_exec_sessions AS sess JOIN sys.dm_exec_connections AS conn ON sess.session_id = conn.session_id;