1、oracle参数open_cursors和session_cached_cursor详解1.SQL> show parameter open_cursors --每个session(会话)最多能同时打开多少个cursor(游标) 2. 3.NAME TYPE VALUE 4.------------------------------------ ----------- -----------------------
2、------- 5.open_cursors integer 300 6.SQL> show parameter session_cached_cursor --每个session(会话)最多可以缓存多少个关闭掉的cursor 7. 8.NAME TYPE VALUE 9.------------------------------------ ----------- ---
5、发ORA-O1000:m~imumopenCUrsOrsexceeded.的错误。如果设置太大,则无端消耗系统内存。我们可以通过如下的sql语句查看你的设置是否合理:[sql] viewplaincopyprint?1.SQL> SELECT MAX(A.VALUE) AS HIGHEST_OPEN_CUR, P.VALUE AS MAX_OPEN_CUR 2. 2 FROM V$SESSTAT A, V$STATNAME B, V$PARAMETER P 3. 3 WHERE A.STATISTIC
6、# = B.STATISTIC# 4. 4 AND B.NAME = 'opened cursors current' 5. 5 AND P.NAME = 'open_cursors' 6. 6 GROUP BY P.VALUE; 7. 8.HIGHEST_OPEN_CUR MAX_OPEN_CUR 1.---------------- -------------------- 2. 28 300 HIGHEST_OPENCUR是实际打开的cursor
8、IAL# 2. FROM V$SESSTAT A, V$STATNAME B, V$SESSION S 3. WHERE A.STATISTIC# = B.STATISTIC# 4. AND S.SID = A.SID 5. AND B.NAME = 'opened cursors curent'; b、同样,