select s.schemaname schema_name,
decode(sign(48 - command),
1,
to_char(command),
'Action Code #' || to_char(command)) action,
status session_status,
s.osuser os_user_name,
s.sid,
p.spid,
s.serial# serial_num,
nvl(s.username, '[Oracle process]') user_name,
s.terminal terminal,
s.program program,
st.value criteria_value
from v$sesstat st, v$session s, v$process p
where st.sid = s.sid
and st.statistic# = to_number('38')
and ('ALL' = 'ALL' or s.status = 'ALL')
and p.addr = s.paddr
order by st.value desc, p.spid asc, s.username asc, s.osuser asc
oracle查看top session
最新推荐文章于 2021-09-25 22:44:11 发布