Oracle8i问题(100分)

littlef 2003-08-30 03:46:33
我在用Oracle8i进行数据库开发,程序运行有时会有这样的错误:
ORA-04031:无法分配4200字节的共享内存("shared pool","unknown object","sga heap","library cache"),怎样来解决这样的问题呢?顺便也讲一下如果同时数据库访问的客户比较多,那么整个Oracle该怎样配置呢?
...全文
27 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
chanet 2003-08-30
  • 打赏
  • 举报
回复


在 DBA Studio 里,加大共享内存
gzh_seagull 2003-08-30
  • 打赏
  • 举报
回复
select sum(reloads)/sum(pins)*100 from v$librarycache;
得到的值大于1%,就增加shared_pool_size.

select gethitratio from v$librarycache;
得到的值小于<90%,可以考虑调整SQL语句(多用带参数的SQL),多用存储过程
jiezhi 2003-08-30
  • 打赏
  • 举报
回复
不管oracle是32 bit ORACLE还是 64 bit 的,假定应用存在没有很好的使用bind var 的情况,也不能设置 shared_pool_size 过大,通常应该控制在200M--300M,如果是 ORACLE ERP 一类的使用了很多存储过程函数、包 ,或者很大的系统,可以考虑增大shared_pool_size ,但是如果超过500M可能是危险的,达到1G可能会造成CPU的严重负担,系统甚至瘫痪。所以shared_pool_size 如果超过300M还命中率不高,那么应该从应用上找原因而不是一味的增加内存,shared_pool_size 过大主要增加了管理负担和latch 的开销。

http://www.itpub.net/showthread.php?s=&threadid=109787
jiezhi 2003-08-30
  • 打赏
  • 举报
回复
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
initialization parameters SHARED_POOL_RESERVED_SIZE and SHARED_
POOL_SIZE. If the large pool is out of memory, increase the initialization
parameter LARGE_POOL_SIZE.
jiezhi 2003-08-30
  • 打赏
  • 举报
回复
提示很明顯了,增大shared pool的大小
就是在init.ora文件里面修改對應的參數。

17,078

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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