Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Distributed Transaction Troubleshooting. Oracle
  • Export Import with QUERY Oracle
  • 751131.1 New Article Error 2819 While Requesting a Systemstate Dump Oracle
  • metalink all dynamic view reference notes. Oracle
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • How to know current SID Oracle
  • USER_TABLES.Freelists Oracle
  • Oracle Data Direct to TAPE Oracle
  • DBMS_SQL for alter session. Oracle
  • Find Plan Hash value fphv.sql Oracle
  • Some useful Unix Commands Linux/Unix
  • Oracle Metalink useful notes Oracle
  • Oracle Statspack survival Guide Oracle
  • Histogram Overview Oracle
  • findobj.sql 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

  • Oracle Metalink useful notes Oracle
  • Oracle Support Metalink ID 161818.1 Oracle
  • reset Sequence Oracle
  • Order by with ROWNUM Oracle
  • myfile Oracle
  • Exadata Basics 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
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • V$CONTROLFILE_RECORD_SECTION reference notes. Oracle
  • AWR settings- MMON is not taking snapshot. Oracle
  • Gathering statistics with DBMS_STATS Oracle
  • Find average Row Length and other table size calculation. metalink notes Oracle
  • Find Stale DR Physical Standby Oracle
  • My Minimum Tuning Programs Oracle
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme