ORACLE 临时解决Ora-4031问题

Oracle ora-4031故障的原因:一般是大量的硬解析导致了共享池shared pool中的free list中产生了大量的内存小碎片。当一个需要非常大的内存来进行硬解析的sql语句到来的时候,无法从free list中找到内存。即使进行内存的释放,还是无法找到符合的内存块,就会报Ora-4031问题。

ORACLE数据库可以使用清空共享池的方法解决ora-4031问题。

具体步骤:

1.查看ORACLE非本地连接。

col con_id for 9999999

col machine for a40

select con_id, machine, count(*) from gv$session where con_id not in (0,1,2) group by con_id, machine order by 1 asc;

con_id表示容器的ID,一般0是CDB本身,1是CDB$ROOT,2是PDB$SEED,一般con_id大于2的是用户的PDB。

所以用户PDB的ID一般从3开始递增。

2.清空shared pool

alter system flush shared_pool;

3.查看ORACLE非本地连接的连接情况。

select con_id, machine, count(*) from gv$session where con_id not in (0,1,2) group by con_id, machine order by 1 asc;

ORACLE   Ora
发表评论
留言与评论(共有 0 条评论) “”
   
验证码:

相关文章

推荐文章