Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Oracle 11g Training on 29JAN1010 Oracle
  • export import with parameter file. Oracle
  • Set Role explaination. Oracle
  • How to calculate PROCESSES parameter Oracle
  • Roles and Stored Object behaviour Oracle
  • Giving Grant on v$DATABASE Oracle
  • move_arch_files.ksh Linux/Unix
  • OPENING A STANDBY DATABASE IN READ-ONLY MODE Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • Guide to Linux System Command Mastery Linux/Unix
  • SQL Server: How to see current transactions or requests SQL Server
  • Roles and Stored Procs II Oracle
  • v$backup.status information Oracle
  • cur_sql.sql Oracle
  • cif crons 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

  • initUOCIOTTO.ora Oracle
  • metalink all dynamic view reference notes. Oracle
  • Wait Based Tuning Step by step with SQL statement Oracle
  • V$transaction notes for finding XID composition. Oracle
  • normal maintenance for exp-imp and renaming table Oracle
  • DBMS_SQL for alter session. 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
  • How to know current SID Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets. Linux/Unix
  • Good RAC & Standby Notes Oracle
  • Flowers Resize datafiles Oracle
  • secure crt settings Linux/Unix
  • DETERMINING WHICH INSTANCE OWNS WHICH SHARED MEMORY & SEMAPHORE SEGMENTS Oracle
  • New OFA for 11g Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme