SELECT connect_time,client_net_address,local_net_address,net_transport,protocol_type,auth_scheme,last_read,
last_write FROM sys.dm_exec_connections where local_net_address!=” and client_net_address!=‘127.0.0.1’
order by connect_time desc
SELECT HOST_NAME() AS HostName, SUSER_NAME() LoggedInUser
SELECThostname,loginame,program_name,cmd,status,last_batch,login_time
FROM sys.sysprocesses where status=‘runnable’