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.
不管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
select sum(reloads)/sum(pins)*100 from v$librarycache; 得到的值大于1%,就增加shared_pool_size.select gethitratio from v$librarycache; 得到的值小于<90%,可以考虑调整SQL语句(多用带参数的SQL),多用存储过程
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.
得到的值大于1%,就增加shared_pool_size.select gethitratio from v$librarycache;
得到的值小于<90%,可以考虑调整SQL语句(多用带参数的SQL),多用存储过程