免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2525 | 回复: 5
打印 上一主题 下一主题

请问,错误代码为4031的错误怎么解决?多谢啊 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-06 20:12 |只看该作者 |倒序浏览
最近的PRO*C程序老是在打开游标的时候报1403错误。
如下:-4031        ORACLE ERROR:ORA-04031: unable to allocate 52480 bytes of shared memory。

看了一下帮助手册,是这么解释地:
04031, 00000, "unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\",\"%s\")"
// *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".  


请问具体怎么解决啊?

论坛徽章:
0
2 [报告]
发表于 2006-11-06 21:41 |只看该作者
你把你的SGA分配贴出来。还有PGA。

论坛徽章:
0
3 [报告]
发表于 2006-11-06 21:47 |只看该作者
什么操作系统, 内核变量也贴出来看看

论坛徽章:
0
4 [报告]
发表于 2006-11-07 09:21 |只看该作者
1. 你的shared pool size设了多大?

2.看看你的open_cursor 是不是太多?
select count(*) from v$open_cursor

论坛徽章:
0
5 [报告]
发表于 2006-11-07 12:20 |只看该作者
操作系统是HP-UX,数据库是9i的。帮忙诊断一下。
SQL> show sga

Total System Global Area 3916399840 bytes
Fixed Size                   742624 bytes
Variable Size             956301312 bytes
Database Buffers         2952790016 bytes
Redo Buffers                6565888 bytes

SQL> show parameter shared_pool_size

NAME                                 TYPE        VALUE
------------------------------------ ----------- -------------------
shared_pool_size                     big integer 738197504


SQL>  select count(*) from v$open_cursor;

  COUNT(*)
----------
      4067

论坛徽章:
0
6 [报告]
发表于 2006-11-08 02:29 |只看该作者
1. select REQUEST_FAILURES, LAST_FAILURE_SIZE from v$shared_pool_reserved;
2. SELECT SUM(PINS),SUM(RELOADS) FROM V$LIBRARYCACHE;
3. alter system flush shared_pool;
    执行这条语句之后,还会不会再报这条错误?
4. -4031        ORACLE ERROR:ORA-04031: unable to allocate 52480 bytes of shared memory。 这个后面是不是还有内容?

数据库版本和OS平台?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP