ORA-04031錯誤分析和解決

來源:互聯網
上載者:User

ORA-04031錯誤分析和解決 

查詢v$shared_pool_reserved視圖可以判斷共用池問題的引發原因:

 

SQL>select FREE_SPACE,AVG_FREE_SIZE,USED_SPACE,AVG_USED_SIZE,REQUEST_FAILURES,LAST_FAILURE_SIZE from v$shared_pool_reserved;

 

FREE_SPACE AVG_FREE_SIZE USED_SPACE AVG_USED_SIZE REQUEST_FAILURES LAST_FAILURE_SIZE

---------- ------------- ---------- ------------- ---------------- -----------------

2685760 167860 0 0 0 0

 

如果request_failures>0且LAST_FAILURE_SIZE>shared_pool_reserved_min_alloc,那麼4031可能是因為共用池包括空間缺少連續的空間所致;考慮加大shared_pool_reserved_min_alloc,並增大shared_pool_reserved_size和shared_pool_size來加大共用池保留空間的可用記憶體。

如果request_failures>0且LAST_FAILURE_SIZE<shared_pool_reserved_min_alloc,或者request_failures=0且LAST_FAILURE_SIZE<shared_pool_reserved_min_alloc,那麼應考慮降低shared_pool_reserved_min_alloc。

 

shared_pool_reserved_min_alloc參數值的查詢:

SQL>

column name format a35

column value format 9999999

column ISDEFAULT format a5

column ISMOD format a5

column ISADJ format a5

select

x.ksppinm name,

y.ksppstvl value,

y.ksppstdf isdefault,

decode(bitand(y.ksppstvf,7),1,'modified',4,'system_mod','false') ismod,

decode(bitand(y.ksppstvf,2),2,'true','false') isadj

from

sys.x$ksppi x,

sys.x$ksppcv y

where

x.inst_id = userenv('instance') and

y.inst_id = userenv('instance') and

x.indx = y.indx

and x.ksppinm like '_shared_pool%' ---/**_% 查詢所有隱含參數’

/

NAME VALUE ISDEF ISMOD ISADJ

----------------------------------- ------- ----- ----- ---------------------------------------------------

_shared_pool_reserved_pct 5 TRUE false false

_shared_pool_reserved_min_alloc 4400 TRUE false false

經驗談:

設定_shared_pool_reserved_min_alloc=4100,不建議設定更低;一般在4100~4400之間。

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.