select substr(a.spid,1,9) pid, substr(b.sid,1,5) sid, substr(b.serial#,1,5) ser#, substr(b.machine,1,6) box, substr(b.username,1,10) username, substr(b.osuser,1,8) os_user, decode(substr(b.program,1,15),null,substr(b.client_info,1,15),substr(b.program,1,15)) program, substr(to_char(logon_time,'dd/mm/yy hh24:mi'),1,15) "Logon Time" from v$session b, v$process a where b.paddr = a.addr and type='USER' order by b.username;