ORA-4031错误 解决方法
遇到ORA-4031错误时。你的心里会不会发怵?ORA-4031非常easy导致数据库出现异常崩溃,当Oracle的核心进程无法获得共享池内存时。它们会把数据库异常宕掉。当然,ORA-4031就像黄灯一样,它在提醒你须要立即採取紧急策略了。不是说它一出现,数据库立即就会宕机。
话题讨论:
1.ORA-4031是Oracle中最令人厌恶的报错,它的出现有哪几种原因?
2.一旦出现4031错误。也就是说共享池内存不足的情况下,我们该怎样释放内存呢?你有木有遇到过对应的情形呢?请回顾下当时是怎样解决的?
3.有一句俗语叫丢车保帅。运行计划是SQL核心关键所在。是否意味着在释放内存时,不应该覆盖运行计划这部分?当运行计划部分占用内存比較多时,怎样优化呢?
4.消耗共享池内存的主要有两种对象,一种是SQL,而是存储过程、函数、包等这类可运行对象。当遇到4031错误时,您认为须要优先释放哪种对象
问题分析:
1、ORA-4031错误的原因,通常是大量的hard parse导致了shared pool中的free list中产生大量的内存小碎片,当一个须要非常大内存来进行hard
parse的sql语句到来时。无法从free list中找到内存,即使进行内存的释放。还是不能找到符合的内存块。从而报ORA-4031错误。
2. ORA-4031错误的解决方法:
该方法治标不治本。
pool的大小
V$SHARED_POOL_ADVICE displays information about estimated parse time in
the shared pool for different pool sizes. The sizes range from 10% of the current shared pool size or the amount of pinned library cache memory (whichever is higher) to 200% of the current shared pool size, in equal intervals. The value of the interval depends
on the current size of the shared pool.
Column | Datatype | Description |
---|---|---|
SHARED_POOL_SIZE_FOR_ESTIMATE | NUMBER | Shared pool size for the estimate (in megabytes) |
SHARED_POOL_SIZE_FACTOR | NUMBER | Size factor with respect to the current shared pool size |
ESTD_LC_SIZE | NUMBER | Estimated memory in use by the library cache (in megabytes) |
ESTD_LC_MEMORY_OBJECTS | NUMBER | Estimated number of library cache memory objects in the shared pool of the specified size |
ESTD_LC_TIME_SAVED | NUMBER |
Estimated elapsed parse time saved (in seconds), owing to library cache memory objects being found in a shared pool of the specified size. This is the time that would have been spent in reloading the required objects in the shared pool had they been aged out due to insufficient amount of available free memory. |
ESTD_LC_TIME_SAVED_FACTOR | NUMBER | Estimated parse time saved factor with respect to the current shared pool size |
ESTD_LC_LOAD_TIME | NUMBER | Estimated elapsed time (in seconds) for parsing in a shared pool of the specified size |
ESTD_LC_LOAD_TIME_FACTOR | NUMBER | Estimated load time factor with respect to the current shared pool size |
ESTD_LC_MEMORY_OBJECT_HITS | NUMBER | Estimated number of times a library cache memory object was found in a shared pool of the specified size |
ORA-4031错误 解决方法的更多相关文章
- SQL SERVER 9003错误解决方法 只适用于SQL2000
SQLSERVER 9003错误解决方法 只适用于SQL2000 (只适用于SQL2000) "无法打开新数据库 'POS'.CREATE DATABASE 中止. (Microsoft S ...
- New XAMPP security concept:错误解决方法
New XAMPP security concept:错误解决方法 (2014-03-06 16:07:46) 转载▼ 分类: php 在Linux上配置xampp后远程访问域名报错: New X ...
- hadoop本地库与系统版本不一致引起的错误解决方法
hadoop本地库与系统版本不一致引起的错误解决方法 部署hadoop的集群环境为 操作系统 centos 5.8 hadoop版本为cloudera hadoop-0.20.2-cdh3u3 集 ...
- mysql Access denied for user root@localhost错误解决方法总结(转)
mysql Access denied for user root@localhost错误解决方法总结(转) mysql Access denied for user \'root\'@\'local ...
- Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法
Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法 Some sites could ...
- eWebeditor编辑器上传图片路径错误解决方法[疑难杂症]【转,作者:unvs】
做了一个多版本的网站,后台用的编辑器是eWebeditor,NET版,后面发现上传图片或者文件之后,路径错误无法显示,必须手工修改才行.. 为了更清楚的说明问题,我下面会说的比较详细,首先是网站文件框 ...
- 网站启动SSL, http变为https后,session验证码错误解决方法
网站启动SSL, http变为https后,session验证码错误解决方法 最近公司需要后台启动安全证书,证书安装完毕后,后台老提示 验证码错误,经过几天的研究,此问题已经得到有效解决,现把方法 ...
- Oracle OCI-22053:溢出错误解决方法
原文 Oracle OCI-22053:溢出错误解决方法 Oracle 数值数据类型最多可存储 38 个字节的精度.当将 Oracle 数值转换为公共语言运行库数据类型时,小数点后边的位数可能过多,这 ...
- Nginx出现“413 Request Entity Too Large”错误解决方法
Nginx出现“413 Request Entity Too Large”错误解决方法 2011-03-25 13:49:55| 分类: 默认分类 | 标签:413 request entit ...
- CAS SSO:汇集配置过程中的错误解决方法
本教程为gevin.me原创文章,转载请注明: CAS SSO:配置过程中的错误解决方法 | Gevin’s Blog 本文将收集在配置CAS SSO遇到的所有错误,希望对大家有帮助,也方便下次搭建的 ...
随机推荐
- nj08---process、console
概念:所有属性都可以在程序的任何地方访问,即全局变量.在JavaScript中,通常window是全局对象,而Node.js的全局对象是global,所有全局变量都是global对象的属性,如:con ...
- angularjs 自定义服务
<!DOCTYPE HTML> <html ng-app="myApp"> <head> <meta http-equiv="C ...
- 8.ES6测试
转自:http://www.ruanyifeng.com/blog/2015/12/a-mocha-tutorial-of-examples.html 如果测试脚本是用ES6写的,那么运行测试之前,需 ...
- 在cncc的最后几天的笔记
数据库范式:http://blog.csdn.net/fg2006/article/details/6936439 数据库事务隔离级别:http://blog.csdn.net/fg2006/arti ...
- OpenGL编程(五)绘直线以及分析绘直线的算法
这次主要实现在窗口上绘制点.线以及修改其属性,另外还会分析画直线的原理和相关算法. 1.在窗口指定位置画点 glBegin(GL_POINTS); glEnd(); 使用glBegin()和glEnd ...
- codeforces 544 D Destroying Roads 【最短路】
题意:给出n个点,m条边权为1的无向边,破坏最多的道路,使得从s1到t1,s2到t2的距离不超过d1,d2 因为最后s1,t1是连通的,且要破坏掉最多的道路,那么就是求s1到t1之间的最短路 用bfs ...
- c3p0-config.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xml> <c3p0-confi ...
- [USACO07MAR]每月的费用Monthly Expense
题目:POJ3273.洛谷P2884. 题目大意:有n个数,要分成m份,每份的和要尽可能小,求这个情况下和最大的一份的和. 解题思路:二分答案,对每个答案进行贪心判断,如果最后得出份数>m,则说 ...
- python 异步IO-aiohttp与简单的异步HTTP客户端/服务器
参考链接:https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/00143209814 ...
- Java基础学习总结(22)——异常处理
一.异常的概念 异常指的是运行期出现的错误,也就是当程序开始执行以后执行期出现的错误.出现错误时观察错误的名字和行号最为重要. package cn.javastudy.summary; public ...