Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Error Handling in Proc Oracle
  • Korn Shell Arithmatic Linux/Unix
  • metalink all dynamic view reference notes. Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle
  • Rollback force for distributed transactions Oracle
  • Restoring a user’s original password 1051962.101 Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • online_ts_bkup.sql Oracle
  • plan10g.sql good1 Oracle
  • Proc code Oracle
  • UNderstand and eliminate Latch contention. Oracle
  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix
  • Export Import with QUERY 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

  • Vivek Tuning for Row Locks. Oracle
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • create database syntax Oracle
  • TNSNAMES entries details Oracle
  • Wait Based Tuning Step by step with SQL statement Oracle
  • temp_use.sql diplays usage of temp ts 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 (387)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (336)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • purge_trc.sh Linux/Unix
  • fuser to check who is using diretory Linux/Unix
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle
  • Updated LCK.SQL file. Oracle
  • Find Command Linux/Unix
  • Virtual Indexes in Oracle Oracle
  • TOP-N Sql to find Nth max or Top N rows Oracle
  • Removing first line Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme