Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • Wait Based Tuning Step by step with SQL statement Oracle
  • run this before doing any dbchange pvm_pre_change.sql Oracle
  • How to find where datafile is created dbf_info.sql Oracle
  • checking connectivity between two servers Linux/Unix
  • sql_doing_fts.sql Oracle
  • Implementation of key based authentications Linux/Unix
  • Roles and Stored Object behaviour Oracle
  • Jai Shree Ram PHP/MYSQL/Wordpress
  • eplan.sql Oracle
  • Building Our Own Namespaces with “Create Context” Oracle
  • VIvek Encryption Package and Its Usage Oracle
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • UNderstand and eliminate Latch contention. Oracle

sid_wise_sql.sql

Posted on 30-Jan-2006 By Admin No Comments on sid_wise_sql.sql

accept u_name prompt ‘Enter User Name (Enter NONE if want SID specific query): ‘

accept s_id prompt ‘Enter SID (Enter 0 for Userspecific Query): ‘

select a.sid, b.sql_text, a.sql_id, c.spid, b.executions, b.disk_reads, b.elapsed_time, b.cpu_time, b.buffer_gets

from v$session a, v$sqlarea b, v$process c

where a.sql_id = b.sql_id(+)

and (a.username = upper(‘&u_name’) or a.sid = &s_id )

and a.paddr = c.addr

/

Oracle, SQL scripts

Post navigation

Previous Post: All About Trace Fils
Next Post: How to check current redo log progress redo_progress.sql

Related Posts

  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • Remove duplicate rows from table Oracle
  • TRUNCATE table and disabling referential constraints. Oracle
  • Find Multiple levels of object dependencies : depen.sql Oracle
  • Roles and Stored Object behaviour Oracle
  • Wait.sql Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Jai Shree Ram Oracle
  • metalink all dynamic view reference notes. Oracle
  • oracle 10g on linux Linux/Unix
  • PLSQL Table Syntax 1 Oracle
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • How to remove blank lines using vi editor command Linux/Unix
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • xargs use Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme