Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • column level grant syntax Oracle
  • Removing Blank lines from file using grep Linux/Unix
  • good note for shared pool tunnig Oracle
  • The most important Tuning Notes Oracle
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle
  • Roles and Stored Object behaviour Oracle
  • perf_today.sql Oracle
  • copying/removing directory with all its subdirectory Linux/Unix
  • Load testing on Oracle 19C RAC with HammerDB Oracle
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • Free conference number from http://www.freeconference.com Oracle
  • cache buffer chain latch Oracle
  • online_ts_bkup.sql Oracle
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • Jai Shree Ram Oracle

find_longsql.sql

Posted on 06-May-2010 By Admin No Comments on find_longsql.sql

–Ref: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1198012113596

column dur format a20

set lines 120 pages 200

select a.sid, a.serial#, a.username,

to_char(sysdate-a.last_call_et/24/60/60,’hh24:mi:ss’) started,

trunc(a.last_call_et/60) || ‘ mins, ‘ || mod(a.last_call_et,60) ||’ secs’ dur,

b.sql_text

from v$sql b, v$session a

where a.username is not null

and a.last_call_et > 10

and a.status = ‘ACTIVE’

and a.sql_address = b.address;

Oracle, SQL scripts

Post navigation

Previous Post: Display the top 5 salaries for each department using single SQL
Next Post: ORA-3136

Related Posts

  • Export With Query Another Example. Oracle
  • ORA-4031 issue and solution on 09-MAY-2008 Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • Good Oracle Architecture In Short and point to point Oracle
  • Exadata Basics Oracle
  • Oracle Internal Good Websites 1 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 (388)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (337)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sesswait.sql Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix
  • Generate SSH without password authentication. Linux/Unix
  • purge_trc.sh Linux/Unix
  • SQL Tracker by SID sqltrackerbysid.sql Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme