Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • tblwopk.sql tablewopk.sql Oracle
  • Library cahe Latches and internal explaination Oracle
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • tblwopk.sql /* Find Tables Without PK */ Oracle
  • How To Limit The Access To The Database So That Only One User Per Schema Are Connected (One Concurrent User Per Schema) Oracle
  • create a folder in multiple places Linux/Unix
  • Oracle Recommended Patches — Oracle Database ID 756671.1 Oracle
  • purge_trc.sh Linux/Unix
  • Find_stale_dr.sql finding stale physical DR.. Oracle
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • Composite Index creation tip from Vivek Oracle
  • online_ts_bkup.sql Oracle
  • How to find where datafile is created dbf_info.sql Oracle
  • oracle fast start failover best practice 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

  • standard Monitoring – 1 Oracle
  • cp_filesystem.sql Oracle
  • DBA_HIST_SQLSTAT contents Oracle
  • get_vmstat_solaris Oracle
  • lck.sql Oracle
  • Benefits and Usage of RMAN with Standby Databases 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 (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Insert cause enqueue locks Oracle
  • scripts to take listener.log backup Linux/Unix
  • To check whether standby is recovering properly or not?? Oracle
  • How does one overcome the Unix 2 Gig file limit? Linux/Unix
  • Directory wise folder wise space usage Linux/Unix
  • longtx.sql Oracle
  • Display the top 5 salaries for each department using single SQL Oracle
  • Mutating Table Error while using database trigger Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme