ORA-04031:无法分配4084字节的共享内存(“shared pool”,”standardsys”,”PL/sql mpcode”,”bamima:bam buffer”)
我写了一个接口程序,把sql2000里的数据导入到oralce数据库中,偶然一天接口程序发生以上错误提示,这是什么原因呢

解决方案 »

  1.   

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

  2.   

    shared pool大小不够了
    需要增大如果你没有权限 并且不知道怎么增大
    联系你的数据库管理员吧
      

  3.   

    SQL> conn / as sysdba --以dba身份登录
    Connected.
    SQL> show parameter spfile --看数据库是否在使用spfileNAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    spfile                               string      D:\ORACLE\DB_1\DBS\SPFILEORCL.
                                                     ORA
    SQL> select * from v$version; --查看版本BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
      

  4.   

    更多的问题 可能是你的sql有问题吧倒数据有大量的未提交数据 ,应该设置分段提交事务要是多大的share pool 也不够用哦
      

  5.   

    可能是内存碎片过多,可以执行 alter system flush share_pool.清空一下共享池