Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Paste command syntax Linux/Unix
  • Jai Shree Ram Linux/Unix
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • How to find where datafile is created dbf_info.sql Oracle
  • good note for shared pool tunnig Oracle
  • sesswait.sql Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • Ports used by Oracle Software Oracle
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle
  • refre.sql Oracle
  • Rename Tablespace Oracle
  • Add new columns in dataframe Python/PySpark
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • db_status.sql Oracle
  • Find nth max and min. Oracle

cur_sql.sql

Posted on 27-Feb-2006 By Admin No Comments on cur_sql.sql

spool cur_sql

set lines 132

set pages 300

col USR format a14

col PAR heading “Parsing ID” format 9999999

col ELA heading “ELP time(Sec)” format 9999999.0

col HASH heading “Hash Value”

col USR heading “Parsing User”

col T heading “SQL Text having Elapsed time > 1 sec”

break on HASH on USR on ELA skip 1

select a.sql_Text,

a.hash_value “HASH” ,

b.username “USR”, a.executions, rows_processed, a.buffer_gets, a.disk_reads, a.sorts, a.users_executing

from v$sqlarea a,dba_users b

where b.username not in (‘SYS’,’SYSTEM’,’DBSNMP’,’VIVEK’, ‘SYSMAN’)

and a.PARSING_SCHEMA_ID = b.user_id

and a.users_executing > 0;

spool off

Oracle, SQL scripts

Post navigation

Previous Post: avail.sh ( find filesystem spae usage)
Next Post: age_alert.ksh aging out alert.log

Related Posts

  • db_status.sql Oracle
  • RAC 11g with vmware Oracle
  • Roles and Stored Procs II Oracle
  • longtx.sql Oracle
  • Find Stale DR Physical Standby Oracle
  • Backup and Recovery Scenarios Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • DBA_HIST_SQLSTAT contents Oracle
  • oracle_env_10g_CADEV Linux/Unix
  • Library cahe Latches and internal explaination Oracle
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • Implementing Listener Security Oracle
  • Deleting first line and lastline of a file using sed Linux/Unix
  • find_open_cur.sql Find open cursorts per session Oracle
  • chk_space_SID.ksh Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme