A surprise question about the shared pool

[复制链接]
查看11 | 回复9 | 2005-10-30 17:05:33 | 显示全部楼层 |阅读模式
Error:
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","BEGIN
DBMS_OUTPUT.ENABLE(100...","PL/SQL MPCODE","BAMIMA: Bam Buffer&quot


ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","BEGIN
DBMS_OUTPUT.GET_LINES(...","PL/SQL MPCODE","BAMIMA: Bam Buffer&quot


ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","BEGIN
DBMS_APPLICATION_INFO....","PL/SQL MPCODE","BAMIMA: Bam Buffer&quot


Version: (MTS)
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
PL/SQL Release 8.1.7.4.0 - Production
CORE8.1.7.0.0 Production
TNS for HPUX: Version 8.1.7.4.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
Shared pool info:
POOL NAME
MBytes
------------ ------------ ----------
shared poolfree memory87.4657211 (total is 230M)
large pool free memory128.500313
java poolfree memory.03125
Event 1:
Just for any simple statement, it would spend more shared pool, such as :
SELECT TO_CHAR(SYSDATE,'mm/dd/yyyy') FROM DUAL

CURSOR
NO340456
it use about 340k shared pool,
Event 2:
alter system flush shared pool;
for this alter command, can not release the shared pool, but before it is Ok.
Why?
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
select count(*) from v$open_cursor是多少……
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
Thanks,
Now is for 18289;
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
Thanks for any helping.
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
盯住一些大的包看看是否可以改善..
还有程序使用绑定变量可以一定程度减少这个问题的出现..
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
Yes, I think now the key issue is Why such as these simple it would spend such more shared pool space? and Why the alter system can not release the shared pool? Bu it is ok normally. Thanks.
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
最初由 thinkless 发布
[B]Thanks,
Now is for 18289; [/B]


Here is the problem……
Check your application.
Close cursor in application……

If must keep cursoropen in application, please control the total number of opening cursors , or you need toincrease shared_pool_size.
No other choise.
The shared pool space will not release when the space was occupy by OPENING cursors…… 。Flush shared pool will not help when many cursors is opening……
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
Thanks rollingpig, you give me a useful hint.
But normally, the total opened cursor about 25000, and the sessions about 600, and the parameter open_cursors is 600.
Anyway, this is a helpful msg and can do any explanation on it, thanks.
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
open_cursors specifies the maximum number of open cursors a session can have at once
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
yes, chj733, you are right, so we just 50 sessions, still not exceed the maximun limitation.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行