Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Remove DOS CR/LFs (^M) Linux/Unix
  • Mutating Table Error while using database trigger Oracle
  • fuser to check who is using diretory Linux/Unix
  • Resolving RMAN Hung Jobs Oracle
  • How to Make Trace Files Created by Oracle Readable by All Users ? Oracle
  • chk_space_SID.ksh Linux/Unix
  • Reading parameter file and printing Linux/Unix
  • backspace in SQL Plus not working then..? Linux/Unix
  • Free conference number from http://www.freeconference.com Oracle
  • Composite Index creation tip from Vivek Oracle
  • How can I tell if ASO is installed ? Oracle
  • All About oracle password and security from metalink Oracle
  • secure crt settings Linux/Unix
  • Drop specific SQL plan baseline – spm Oracle
  • switchlogfile.sh Linux/Unix

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

  • Changing unix system clock when Oracle database is running. Oracle
  • dbms_job.submit example Oracle
  • SQLPLUS COPY command Precautions. Oracle
  • Optimizer SORT Operations Oracle
  • Create type and Grant on it. Oracle
  • Oracle 10g for solaris 10 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
  • create user with unlimited quota Oracle
  • metalink all dynamic view reference notes. Oracle
  • Session_info.ksh Linux/Unix
  • How to connect to Oracle Database with Wallet with Python. Oracle
  • How to find pinned objects from shared pool. (pinned via dbms_shared_pool.keep) Oracle
  • UTL_FILE test program Oracle
  • Find Stale DR Physical Standby Oracle
  • FGA Part-I Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme