Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • RAC 11g with vmware Oracle
  • dbinv.sql Oracle
  • Oracle Support Metalink ID 161818.1 Oracle
  • OPENING A STANDBY DATABASE IN READ-ONLY MODE Oracle
  • Sequence Resetting Oracle
  • move_arch_files.ksh Linux/Unix
  • Proc Compilation Oracle
  • perf_today.sql Oracle
  • Generate SSH without password authentication. Linux/Unix
  • Small sample shell program Linux/Unix
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle
  • Facts about SCN and Rollback Segment Oracle
  • cif crons Linux/Unix
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • GSQ.sql Oracle

sid_wise_cursor.sql find open cursor basis on username or SID

Posted on 10-Mar-2006 By Admin No Comments on sid_wise_cursor.sql find open cursor basis on username or SID

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.user_name

from v$session a, v$open_cursor 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: find_open_cur.sql Find open cursorts per session
Next Post: Drop tempfiles from database

Related Posts

  • switchover for primary database Oracle
  • UNderstand and eliminate Latch contention. Oracle
  • Renaming the column name Oracle
  • Wait.sql Oracle
  • Histogram information Oracle
  • Alter procedure auditing 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 (387)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (336)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Recovering lost SYS password Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • move_arch_files.ksh Linux/Unix
  • standard Monitoring – 1 Oracle
  • My Test Case On 21-OCT-2005 Oracle
  • replace alphabets using sed Linux/Unix
  • Formatter Explain plan Output 1 Oracle
  • FGA Part-I Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme