Show all connected users
select username,sid || ',' || serial# "ID",status,last_call_et "Last Activity"
from v$session
where username is not null
order by status desc, last_call_et desc
Time since last user activity
select username,floor(last_call_et / 60) "Minutes",status
from v$session
where username is not null
order by last_call_et
Sessions sorted by logon time
select username,osuser,sid || ',' || serial# "ID",status,to_char(logon_time, 'hh24:mi dd/mm/yy') login_time,last_call_et
from v$session
where username is not null
order by login_time
Show user info including os pid
select s.sid || ',' || s.serial# "SID/SERIAL",s.username,s.osuser,p.spid "OS PID",s.program
from v$session s,v$process p
Where s.paddr = p.addr
order by to_number(p.spid)
select username,sid || ',' || serial# "ID",status,last_call_et "Last Activity"
from v$session
where username is not null
order by status desc, last_call_et desc
Time since last user activity
select username,floor(last_call_et / 60) "Minutes",status
from v$session
where username is not null
order by last_call_et
Sessions sorted by logon time
select username,osuser,sid || ',' || serial# "ID",status,to_char(logon_time, 'hh24:mi dd/mm/yy') login_time,last_call_et
from v$session
where username is not null
order by login_time
Show user info including os pid
select s.sid || ',' || s.serial# "SID/SERIAL",s.username,s.osuser,p.spid "OS PID",s.program
from v$session s,v$process p
Where s.paddr = p.addr
order by to_number(p.spid)
No comments:
Post a Comment