Friday, June 19, 2009

Active sql

select s.sid,
s.status,
s.process,
s.osuser,
a.sql_text,
p.program
from v$session s,
v$sqlarea a,
v$process p
where s.sql_hash_value=a.hash_value
and s.sql_address=a.address
and s.paddr=p.addr
and s.schemaname='BKO_DATA'
and s.status='ACTIVE';