Oracle User Sessions

Ever wanted to know who was logged into your oracle server and where from? This SQL will show you the username connected, which machine they are connected from and what time they connected.

SELECT s.username, s.program, s.logon_time
   FROM v$session s, v$process p, sys.v_$sess_io si
   WHERE s.paddr = p.addr(+) AND si.sid(+) = s.sid
   AND s.type='USER';

Filed under computing

Tagged Oracle