Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

oc.sql - Display open cursor information.

SQL Scripts

oc.sql - Display open cursor information.

by  Michael42  Posted    (Edited  )
Code:
set echo off
-- oc.sql
-- Purpose: Display open cursor information.
-- -----------------------------------------------------------------------------
column username  format a25
column program   format a35
column sid       format 999999

SELECT s.sid,s.username,s.program,count(oc.sid) open_cursors
FROM v$session s, v$open_cursor oc
WHERE oc.sid = s.sid
GROUP BY s.sid,s.username,s.program
ORDER BY open_cursors desc

/
set echo on
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top