set lines 200
col username format a20
col wait_class format a30
col OSUSER format a20
col EVENT format a20
select a.username, a.osuser, a.sid, a.serial#, b.spid, a.seconds_in_wait,
a.event, a.state, a.wait_class
from v$session a, v$process b
where a.paddr = b.addr
and a.seconds_in_wait > 500 and a.username is not null;
set lines 200
col username format a20
col wait_class format a30
col OSUSER format a20
col EVENT format a30
select distinct a.username, a.osuser, a.sid, a.serial#, b.spid, a.seconds_in_wait,
a.event, a.state, a.wait_class
from v$session a, v$process b
where a.username like 'ADMIN_MV' AND a.SID=1070 AND a.paddr = b.addr
and a.seconds_in_wait > 50;