scripts

Find High water mark of a table

Below is the script for finding high water mark of a table. -- -- Show the High Water Mark for a given table, or all tables if ALL is specified for Table_Name. -- SET LINESIZE 300 SET SERVEROUTPUT ON ...

How to find current running sqls in oracle

Use below script to get the current running sql details.   select sesion.sid, sesion.username, optimizer_mode, hash_value, address, cpu_time, elapsed_time, sql_text from v$sqlarea sqlarea, v$sess...

Top 5 cached sql statements by elapsed time in oracle

Get the Top 10 cached sql statements details SELECT sql_id,child_number,sql_text, elapsed_time FROM (SELECT sql_id, child_number, sql_text, elapsed_time, cpu_time, disk_reads, RANK () OVER (ORDER BY e...