Oracle Bad SQL Detection Script
Did you ever want to check what is the SQL running with high resource consumption in your Oracle DB? The script below can help you to check by returning all the bad SQL line: -
Check Bad SQL Script
SQL> SELECT b.username, a.disk_reads reads, a.executions exc, a.disk_reads / DECODE( a.executions, 0, 1, a.executions) rds_exec_ratio, a.sql_text STATEMENT, a.action, a.first_load_time, a.module FROM dba_users b, v$sqlarea a WHERE a.disk_reads > 5000 AND a.parsing_user_id = b.user_id ORDER BY rds_exec_ratio DESC
PreviousNext» Oracle Session Wait Info
Leave a Comment



