Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Good Link from metalink 1 Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • SQL Server Vs Oracle Architecture difference SQL Server
  • sess1.sql Oracle
  • chk_space_SID.ksh Linux/Unix
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • Check Oracle installed products using one command Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • PLSQL Table Syntax 2 Oracle
  • Goldengate document from Porus Oracle
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • online_bkup.sql Oracle
  • Find long Running Transaction Linux/Unix
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle
  • avail.sh ( find filesystem spae usage) Linux/Unix

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

  • Drop all SPM baselines for SQL handle Oracle
  • Updated LCK.SQL file. Oracle
  • Pending Distributed Transations Oracle
  • When error comes for temporary tablespace with version <= 9i Oracle
  • Ports used by Oracle Software Oracle
  • sess_server.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)
  • 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
  • Histogram information Oracle
  • Implementing Listener Security Oracle
  • AWR settings- MMON is not taking snapshot. Oracle
  • send attachment from unix-shell script Linux/Unix
  • arch_configUOCIOTTO.ora Oracle
  • sid_wise_sql.sql Oracle
  • v$backup.status information Oracle
  • Removing Ctrl-M from end of line using vi Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme