How to. Resolvendo ORA-01000 maximum open cursors exceeded Verificar configuração atual de cursores.
1 2 3 4 5 6 7 8 9 |
14:54:39 SYS@NBS > show parameter cursor NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cursor_bind_capture_destination string memory+disk cursor_sharing string EXACT cursor_space_for_time boolean FALSE open_cursors integer 300 session_cached_cursors integer 50 |
Verificar configuração atual de cursores.
1 2 3 4 5 6 7 8 9 10 11 |
SYS@orcl > col MAX_OPEN_CUR format a20 SYS@orcl > select max(a.value) as highest_open_cur, p.value as max_open_cur from gv$sesstat a, gv$statname b, gv$parameter p where a.statistic# = b.statistic# and b.name = 'opened cursors current' and p.name = 'open_cursors' group by p.value; HIGHEST_OPEN_CUR MAX_OPEN_CUR ---------------- -------------------- 177 300 |
Cursor aberto por usuário.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
Connected to: Oracle Database 11g Release 11.2.0.4.0 - 64bit Production select s.username, max(a.value) from v$sesstat a, v$statname b, v$session s where a.statistic# = b.statistic# and s.sid (+)= a.sid and b.name = 'opened cursors current' group by s.username; USERNAME MAX(A.VALUE) ------------------------------ ------------ JSOUZA 33 BMENEZES 57 RALVESMIR 29 JMACENA2 37 MASSAO4 49 NLEITAO 42 FGSILVA 30 FFILHO 109 TMIRANDA 58 NBS2 67 JANE20 41 DRALVESFIS 37 ECARLOSM 56 MBRABO 110 GSOUZA 114 DGALDINO 66 CJUNIOR 121 CVALE 94 ASCIOLI 51 LREDIG 160 4VICTORIA 56 SYS 5 JMUNIZ 177 51 rows selected. |
Alterar quantidade cursores.
1 |
SYS@orcl > alter system set open_cursors=QUANTIDADE; |