Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • handling filenname with space Linux/Unix
  • backspace in SQL Plus not working then..? Linux/Unix
  • How to know current SID Oracle
  • Rownum with Order by Oracle
  • move_arch_files.ksh Linux/Unix
  • Optimizer_Index init.ora parameter explaination. Oracle
  • database trigger failing Oracle
  • catall.sh Linux/Unix
  • V$ROLLSTAT status is Full Oracle
  • OEM-troubleshooting on 20-MAY-08 Oracle
  • get_vmstat.ksh for Solaris Oracle
  • Removing first line Linux/Unix
  • Exadata Basics Oracle
  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix
  • Find Time Consuming SQL Statements in Oracle 10g 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

  • tblwopk.sql /* Find Tables Without PK */ Oracle
  • V$ROLLSTAT status is Full Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • Ports used by Oracle Software Oracle
  • sql_doing_fts.sql Oracle
  • Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql 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 (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • get_vmstat.ksh for Solaris Oracle
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • CPU speed on solaris Linux/Unix
  • create database syntax Oracle
  • How to know Number of CPUs on Sun Box Linux/Unix
  • myfile Oracle
  • TRUNCATE table and disabling referential constraints. Oracle
  • Flowers Resize datafiles Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme