Thursday, 8 February 2007

Oracle 10g SQL Script to list the connected users

OK, I know that EM can give you the same result in much prettier form, but let's keep that just in case.

SET LINESIZE 200
SET PAGESIZE 66

SELECT s.username, s.logon_time, s.machine, s.osuser, s.program
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';

No comments:

Post a Comment

I have had so many good people trying to promote various community oriented sites through here. Therefore all comments will first have to come through me... so I get a chance to learn about the interesting sites before you do ...