SQL Server で現在接続中のセッションを確認するSQL

select * from sys.dm_exec_sessions where host_name is not NULL