Who is connected via SQL DAC


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.