Query to find all executing sql

Query to find all executing sql

select sql_text
from v$sqlarea
where users_executing > 0
/

Query to find a particular users current sql

Select sql_text from v$sqlarea
where (address, hash_value) in
(select sql_address, sql_hash_value
from v$session
where username like ‘&username’);

  • January 21, 2019 | 16 views
  • Comments