Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Find total file sizes Linux/Unix
  • OEM-Commnds Oracle
  • runsql_once.ksh Linux/Unix
  • Find_table_size.sql Oracle
  • Changing unix system clock when Oracle database is running. Oracle
  • Temporary Tablespace Information and restriction. Oracle
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • ORACLE_SID in sqlplus Oracle
  • How To Transfer Passwords Between Databases (ref note: 199582.1) Oracle
  • perf_today.sql Oracle
  • Export Import with QUERY Oracle
  • Changing the Global Database Name Oracle
  • UNderstand and eliminate Latch contention. Oracle
  • scp with ssh2 Linux/Unix
  • set_env_dba 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

  • Resolving RMAN Hung Jobs Oracle
  • Explain Plan Output 2 Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • How to set Processes Parameter Oracle
  • Pending Transaction Neighbors Script Oracle
  • Oracle Identifiers 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 (394)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • tracksqltime.sql05-Mar-2026
  • 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

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Caching sequence in Memory Oracle
  • to see when crontab is changed. Linux/Unix
  • Find_stale_dr.sql finding stale physical DR.. Oracle
  • SQL Server: How to see historical transactions SQL Server
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • copying/removing directory with all its subdirectory Linux/Unix
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme