请高手帮忙看看这个问题,有时候sql执行时间过长,就会抛出这个异常,平时使用又没有问题。
把sql在pl/sql中执行,又不会有任何问题。java.sql.SQLException: ORA-04031: unable to allocate 8192 bytes of shared memory ("large pool","unknown object","sort subheap","sort key")

解决方案 »

  1.   

    补充:查看数据库space,容量足够大。
      

  2.   

    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".
      

  3.   

    想在都是内存都是自动管理模式,只要增加sga_max_size就行了,至于里面怎么分配的oracle管理。
      

  4.   

    你是不是有很多的游标没有释放加大large_pool_size 
      

  5.   

    你有merterlink的帐号 minitoy?