SQL that is currently "ACTIVE or running
select S.USERNAME, s.sid, s.serial#,s.osuser, t.sql_id, sql_text
from v$sqltext_with_newlines t,V$SESSION s
where t.address =s.sql_address
and t.hash_value = s.sql_hash_value
and s.status = 'ACTIVE'
and s.username not in('SYSTEM','SYS','SYSMAN')
order by s.sid,t.piece;
No comments:
Post a Comment