Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle
  • Sample WW22 listener.ora Oracle
  • Changing default shell Linux/Unix
  • findobj.sql Oracle
  • find_idle_cpu.sql Oracle
  • EXTPROC Oracle
  • CTAS with LONG Column for 9i and higher Oracle
  • create database link syntax Oracle
  • Oracle Internal Good Websites 1 Oracle
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • Session_info.ksh Linux/Unix
  • to see when crontab is changed. Linux/Unix
  • Find Stale DR Physical Standby Oracle
  • DBMS_SQL for alter session. Oracle
  • Configure ssh authentications for RAC 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

  • Oracle Connections expire_time and firewall Oracle
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle
  • Good Doc 28-JUN-2006 Oracle
  • FRA Information. Oracle
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • v$event_name 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
  • Check SQL Server edition SQL Server
  • cp_filesystem.sql Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris) Linux/Unix
  • ipcs -l Linux/Unix
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell Linux/Unix
  • Monitor and Trace Unix processes using truss Linux/Unix
  • Absolute file number and relative file number Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme