How to find out the active sql details

column sid format 9999
column username format a12
column sql_text form a64

select a.sid,a.serial#,a.username,c.executions,status, b.sql_text
from v$session a ,v$sqltext b ,v$sqlarea c
where a.username is not null
and status=’ACTIVE’
–and sid in (174)
and   a.sql_address = b.address(+)
and   a.sql_address = c.address(+)
order by status,1,2,b.piece;

  • January 19, 2019 | 16 views
  • Comments