Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Running select from V$ views from remote server Linux/Unix
  • Locally Managed Tablespace and Dictionary managed tablespace (LMT-DMT) Oracle
  • pvm_pre_change.sql Oracle
  • Optimizer SORT Operations Oracle
  • get_aix_vmstat.ksh Oracle
  • set_env_dba Linux/Unix
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • create trigger syntax Oracle
  • Oracle Internal Good Websites 1 Oracle
  • Convert multiple rows to single column Oracle
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • tab.sql Oracle
  • Small sample shell program Linux/Unix
  • sbind.sql Find Bind variable from sql_id sqlid Oracle
  • Windows based Command line mailing program like mailx (Sednmail for windows) PHP/MYSQL/Wordpress

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

  • Running PDB on single node in RAC Oracle
  • V$CONTROLFILE_RECORD_SECTION reference notes. Oracle
  • Very Good Oralce Internal Tuning Book Oracle
  • Caching sequence in Memory Oracle
  • Giving Grant on v$DATABASE Oracle
  • Wait Based Tuning Step by step with SQL statement 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 (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • arch_configUOCIOTTO.ora Oracle
  • Good notes on Oracle Events Oracle
  • TABLE SIZING WITH DB_BLOCK ARCHITECTURE Reference : Metalink note : 10640.1 Oracle
  • Jai Shree Ram Oracle
  • Alter procedure auditing Oracle
  • fkwoind.sql fkwoindex.sql Oracle
  • TRUNCATE table and disabling referential constraints. Oracle
  • Changing the Global Database Name Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme