1

For example Microsoft Sql Server installed in Server A. For ServerA there may be many clients. if a client access any database of server A thru statement or stored procedure ,i need to find client Machine Name using SQL Server Profiler.

3
  • 1
    This is filter Hostname Jun 2, 2015 at 11:07
  • @GiorgiNakeuri, just want to add that the HostName reported by Profiler/SQL Trace/Extended Events can be overridden in the client connection string.
    – Dan Guzman
    Jun 2, 2015 at 11:14
  • But Hostname Column always shows Server Name not Client Machine name Jun 2, 2015 at 13:02

1 Answer 1

3

Look at the execution DMVs, host_name is in sys.dm_exec_sessions:

select * from sys.dm_exec_sessions
select * from sys.dm_exec_connections

A common query (from MSDN) to give you connection info:

SELECT c.session_id, c.net_transport, c.encrypt_option, 
    c.auth_scheme, s.host_name, s.program_name, 
    s.client_interface_name, s.login_name, s.nt_domain, 
    s.nt_user_name, s.original_login_name, c.connect_time, 
    s.login_time 
FROM sys.dm_exec_connections AS c
JOIN sys.dm_exec_sessions AS s
    ON c.session_id = s.session_id

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.