Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • To see only files and/or folders using LS command Linux/Unix
  • Complete Git Tutorial for Beginners GIT
  • sql_doing_fts.sql Oracle
  • Committing distributed transaction using commit force Oracle
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • Important Solaris Commands Linux/Unix
  • How to collect CPU usage on Linux using Shell script Linux/Unix
  • Trace a SQL session from another session using ORADEBUG Oracle
  • FGA Part-I Oracle
  • catting.sh Linux/Unix
  • get_aix_vmstat.ksh Oracle
  • Changing default shell Linux/Unix
  • checking connectivity between two servers Linux/Unix
  • V$INSTANCE of Oracle in MYSQL MYSQL
  • get_vmstat.ksh for Solaris 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

  • Finding Oracle Patches with opatch Oracle
  • RMAN : Consistent Backup, Restore and Recovery using RMAN Oracle
  • switchover for primary database Oracle
  • cp_filesystem.sql Oracle
  • lck.sql Oracle
  • fkwoind.sql fkwoindex.sql Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sess1.sql Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • Windows based Command line mailing program like mailx (Sednmail for windows) PHP/MYSQL/Wordpress
  • How to sort list of files on basis of their sizes. Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • Remove duplicate rows from table Oracle
  • Export With Query Another Example. Oracle
  • This is im telling Kishore Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme