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".
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
更多的问题 可能是你的sql有问题吧倒数据有大量的未提交数据 ,应该设置分段提交事务要是多大的share pool 也不够用哦
可能是内存碎片过多,可以执行 alter system flush share_pool.清空一下共享池
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".
需要增大如果你没有权限 并且不知道怎么增大
联系你的数据库管理员吧
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