• Found an easier way to do it. (Combined 2 scripts):

    select distinct hostname, client_net_address from sysprocesses

    inner join sys.dm_exec_connections ON sysprocesses.spid=sys.dm_exec_connections.session_id

    where hostname <> ''

    Alex Donskoy