背景:
2017-04-21 14:00 收到用户反馈数据库db1连接不上,报错信息是“ORA-04031: unable to allocate 4120 bytes of shared memory ("shared pool",...)”
问题:
是什么原因导致shared pool内存不足呢?
分析:
1. shared pool内存不足可能由如下原因造成:
1.1 shared pool szie配置过少
1.2 硬解析过多导致shared pool内存消耗超出预期
1.3 触发bug
2. 数据说话,生成awr验证,生成13-14点awr,发现这个时间可能不是第一现场时间,原因是shared pool size 已经在13点时变成48G,buffer cache只有128mb,由此可以证明shared pool在13点以前就出现空间不足,数据库自动扩展了,数据如下: