Posted By

tvanzele on 03/31/10


Tagged

sql DMV


Versions (?)

Who is connected via SQL DAC


 / Published in: SQL
 

  1. 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
  2. FROM sys.dm_exec_connections dec
  3. JOIN sys.endpoints e ON e.endpoint_id = dec.endpoint_id
  4. JOIN sys.dm_exec_sessions des ON des.session_id = dec.session_id
  5. WHERE e.name = 'Dedicated Admin Connection'

Report this snippet  

You need to login to post a comment.