ORA-04031: unable to allocate 4200 bytes of shared memory

ymh2008 2004-10-22 05:13:14
我的系统是java1.4+tomcat5.0,每隔半个月就会出现ORA-04031: unable to allocate 4200 bytes of shared memory 这种提示,重启一下数据库就好了,怎样才能根治?
...全文
802 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
daydayupliq 2004-10-25
  • 打赏
  • 举报
回复
楼主,你去找找绑定变量的资料来看吧!
这个才是治本之道!
ORA-04031: unable to allocate string bytes of shared memory ("string","string","string","string")


Cause: More shared memory is needed than was allocated in the shared pool.

Action: If the shared pool is out of memory, either use the dbms_shared_pool package to pin large packages, reduce your use of shared memory, or increase the amount of available shared memory by increasing the value of the INIT.ORA parameters "shared_pool_reserved_size" and "shared_pool_size". If the large pool is out of memory, increase the INIT.ORA parameter "large_pool_size"
ATGC 2004-10-24
  • 打赏
  • 举报
回复
如上所说,加大共享池能解决
但是你的应用是java1.4+tomcat5.0,所以不能光考虑oracle一方的问题
要看看java1.4+tomcat5.0对数据库的连接是否及时断开,SQL语句时候合理,内存是否及时释放
虽然JAVA说内存会及时释放的,俺看不一定。。
zhaokeke2004 2004-10-22
  • 打赏
  • 举报
回复
调整共享内存的大小
wxdsun 2004-10-22
  • 打赏
  • 举报
回复
1.提高sql语句的重用率
2.定期重整shared pool 空间,使用下面的语句
alter system flush shared_pool;

3,490

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 高级技术相关讨论专区
社区管理员
  • 高级技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧