Monday, October 19, 2020

Find current running SQL :


select sesion.sid,
ses.username,
optimizer_mode,
hash_value,
address,
cpu_time,
elapsed_time,
sql_text
from v$sqlarea sa, v$session ses
where ses.sql_hash_value = sa.hash_value
and ses.sql_address = sa.address
and ses.username is not null;