MySQL, Oracle, Linux, 软件架构及大数据技术知识分享平台

网站首页 > 数据库 / 正文

ORACLE 临时解决Ora-4031问题

2024-11-26 20:04 huorong 数据库 5 ℃ 0 评论

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;

Tags:oracle into 临时表

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言