Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • find_err.sql for finding errors from dba_errors. Oracle
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle
  • Disbaling DBA_SCHEDULER_JOBS Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • sess1.sql Oracle
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle
  • check_copy_progress.sh Linux/Unix
  • Histogram information Oracle
  • How to find the real execution plan and binds used in that explain plan in Oracle 10g?? Oracle
  • Removing Blank lines from file using grep Linux/Unix
  • Order by with ROWNUM Oracle
  • switchlogfile.sh Linux/Unix
  • oracle Dba site Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) 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

  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • 10g oem configuration Oracle
  • oracle fast start failover best practice Oracle
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle
  • Optimizer_Index init.ora parameter explaination. Oracle
  • find_open_cur.sql Find open cursorts per 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 (392)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sql_doing_fts.sql Oracle
  • All About oracle password and security from metalink Oracle
  • Order by with ROWNUM Oracle
  • Check SQL Server edition SQL Server
  • configUOCIOTTO.ora Oracle
  • find_cons.sql Oracle
  • create database link syntax Oracle
  • FRA Information. Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme