Views: 16.220 views
Hello people,
Good afternoon!
In this very quick post, I will show you the usefulness of the system view. dm_exec_sessions, where we can query the connected sessions on our instance of SQL Server.
How to identify users logged in to the instance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | SELECT session_id, login_time, host_name, program_name, client_interface_name, login_name, status, cpu_time, memory_usage, last_request_start_time, last_request_end_time, transaction_isolation_level, lock_timeout, deadlock_priority FROM sys.dm_exec_sessions WHERE login_name NOT IN ('sa', 'AUTORIDADE NT\SISTEMA', 'NT AUTHORITY\SYSTEM') |
That's it folks!
See you!
Obrigado!
Great post.
Is there any way to terminate connections by users?