Skip to content

Commit c13ecf2

Browse files
committed
Shows the current cursors open and the maximum allowed
1 parent 47a4203 commit c13ecf2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

monitor_cursors.sql

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
REM Script Name : monitor_cursors.sql
2+
REM Author : Craig Richards
3+
REM Created : 17 July 2013
4+
REM Last Modified :
5+
REM Version : 1.0
6+
REM
7+
REM Modifications :
8+
REM
9+
REM Description : Shows the amount of cursors currently open
10+
11+
SET LINESIZE 200
12+
13+
COLUMN max_open_cursor FORMAT a30
14+
15+
SELECT MAX(a.value) AS highest_open_cursor, p.value AS max_open_cursor
16+
FROM v$sesstat a, v$statname b, v$parameter p
17+
WHERE a.statistic# = b.statistic#
18+
AND b.name = 'opened cursors current' AND p.name= 'open_cursors'
19+
GROUP BY p.value;

0 commit comments

Comments
 (0)