forked from geekcomputers/Oracle-SQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonitor_cursors.sql
More file actions
19 lines (16 loc) · 530 Bytes
/
monitor_cursors.sql
File metadata and controls
19 lines (16 loc) · 530 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
REM Script Name : monitor_cursors.sql
REM Author : Craig Richards
REM Created : 17 July 2013
REM Last Modified :
REM Version : 1.0
REM
REM Modifications :
REM
REM Description : Shows the amount of cursors currently open
SET LINESIZE 200
COLUMN max_open_cursor FORMAT a30
SELECT MAX(a.value) AS highest_open_cursor, p.value AS max_open_cursor
FROM v$sesstat a, v$statname b, v$parameter p
WHERE a.statistic# = b.statistic#
AND b.name = 'opened cursors current' AND p.name= 'open_cursors'
GROUP BY p.value;