/ Published in: SQL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT DEC.local_tcp_port AS DAC_Port, des.login_name AS LoginName, des.nt_domain AS NTDomain,des.nt_user_name AS NTUserName, DEC.session_id AS SPID,DEC.connect_time AS ConnectTime, DEC.last_read AS LastRead, DEC.last_write AS LastWrite,des.host_name AS HostName, DEC.client_net_address AS ClientIP, des.program_name AS AppName,e.state AS EndpointState, e.is_admin_endpoint AS IsAdminEndpoint FROM sys.dm_exec_connections DEC JOIN sys.endpoints e ON e.endpoint_id = DEC.endpoint_id JOIN sys.dm_exec_sessions des ON des.session_id = DEC.session_id WHERE e.name = 'Dedicated Admin Connection'