Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • proper cpu stats Linux/Unix
  • MYSQL for Oracle DBA MYSQL
  • Facts about SCN and Rollback Segment Oracle
  • Locktree.sql Oracle
  • get_aix_vmstat.ksh Oracle
  • Monitor and Trace Unix processes using truss Linux/Unix
  • TABLE SIZING WITH DB_BLOCK ARCHITECTURE Reference : Metalink note : 10640.1 Oracle
  • More info about /proc folder and its relation with processes. Linux/Unix
  • find_open_cur.sql Find open cursorts per session Oracle
  • find the files that are 1 day old. Linux/Unix
  • cold backup scripts to copy locally Linux/Unix
  • Very Good Oralce Internal Tuning Book Oracle
  • Sending SQLPLUS output in HTML format 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

  • When to rebuld B-tree index Oracle
  • find_open_cur.sql Find open cursorts per session Oracle
  • Mutating Table Error while using database trigger Oracle
  • 272332.1 CRS 10g Diagnostic Collection Guide Oracle
  • How to Make Trace Files Created by Oracle Readable by All Users ? Oracle
  • FGA Part-I Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • 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

  • 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
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Caching sequence in Memory Oracle
  • Good Doc 28-JUN-2006 Oracle
  • DBA_HIST_SQLSTAT contents Oracle
  • ORA-01220 Oracle
  • ipcs -l Linux/Unix
  • Another Tuning Article for subheap of shared pool Oracle
  • ORA-4031 issue and solution on 09-MAY-2008 Oracle
  • Directory wise folder wise space usage Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme