Monitor SQL Area



My OraFAQ Blog

Contact me

This script lets you monitor the SQL Area. The username shows which Oracle user first submitted this statement for parsing; the first_load_time is when the statement was submitted for parsing.

select sql_text, executions, disk_reads, buffer_gets, d.username, first_load_time
from v$sqlarea v, dba_users d
where d.user_id = v.parsing_user_id
order by disk_reads desc

Use this script to give you information on currently running SQL and on who's running it.

select * from v$sqlarea sq , v$session s
where sq.HASH_VALUE=s.sql_hash_value
and sq.address=s.sql_address
and s.status='ACTIVE';

Note: Proofread any scripts before using. Always try scripts on a test instance first. I'm not responsible for any damage, even if you somehow manage to make my scripts corrupt every last byte of your data, set your server on fire and serve you personally with an eviction notice from your landlord!
All scripts and tips © Natalka Roshak 2001-2005.
Enjoy the FREE tips folks...