[20190104]sga_target 的設定和ORA-04031錯誤.txt
[20190104]sga_target 的設定和ORA-04031錯誤.txt
--//連結http://www.itpub.net/thread-2104417-1-1.html的問題,我猜測跟共享池的子池有關.
--//透過測試說明問題.
--//版本11.2.0.4
1.檢查引數檔案:
$ cat initxxxx.ora
db_name=xxxx
instance_name=xxxx
sga_target=50G
sga_max_size=50G
--//設定sga_target=50G.
2.啟動到nomount:
SYS@xxxx> startup nomount
ORACLE instance started.
Total System Global Area 5.3447E+10 bytes
Fixed Size 2265864 bytes
Variable Size 5100276984 bytes
Database Buffers 4.8318E+10 bytes
Redo Buffers 26480640 bytes
SYS@xxxx> show parameter cpu_count
NAME TYPE VALUE
---------- -------- -------
cpu_count integer 24
--//cpu_count=24.
SYS@xxxx> @ hide _kghdsidx_count
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE
--------------- ------------------ ------------- ------------- ------------
_kghdsidx_count max kghdsidx count TRUE 6 6
SYS@xxxx> @ hide _enable_shared_pool_durations
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE
----------------------------- --------------------------------------- ------------- ------------- ------------
_enable_shared_pool_durations temporary to disable/enable kgh policy TRUE TRUE TRUE
--//_kghdsidx_count=6,這個數值與cpu數量存在密切關係.24/4 = 6,但是最大隻能是7.
--//是否建立這麼多還與共享池大小有關.可以查詢如下確定,好像11g開始每個子池最大512M.
--//11g還會將單個子緩衝池分割為4個子分割槽進行管理.
SYS@xxxx> select addr,latch#,level#,child#,name,gets from v$latch_children where name='shared pool';
ADDR LATCH# LEVEL# CHILD# NAME GETS
---------------- ---------- ---------- ---------- ----------- ----
00000000601102D8 336 7 7 shared pool 13
0000000060110238 336 7 6 shared pool 297
0000000060110198 336 7 5 shared pool 187
00000000601100F8 336 7 4 shared pool 328
0000000060110058 336 7 3 shared pool 348
000000006010FFB8 336 7 2 shared pool 230
000000006010FF18 336 7 1 shared pool 225
7 rows selected.
3.而如果修改引數:
$ cat initxxxx.ora
db_name=xxxx
instance_name=xxxx
sga_target=0
sga_max_size=50G
--//設定sga_target=0.
SYS@xxxx> startup nomount
ORACLE instance started.
Total System Global Area 5.3447E+10 bytes
Fixed Size 2265864 bytes
Variable Size 5.3284E+10 bytes
Database Buffers 134217728 bytes
Redo Buffers 26480640 bytes
SYS@xxxx> @ hide _kghdsidx_count
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE
--------------- ------------------ ------------- ------------- ------------
_kghdsidx_count max kghdsidx count TRUE 1 1
SYS@xxxx> @ hide _enable_shared_pool_durations
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE
----------------------------- --------------------------------------- ------------- ------------- ------------
_enable_shared_pool_durations temporary to disable/enable kgh policy TRUE FALSE FALSE
SYS@xxxx> select addr,latch#,level#,child#,name,gets from v$latch_children where name='shared pool';
ADDR LATCH# LEVEL# CHILD# NAME GETS
---------------- ---------- ---------- ---------- ----------- ----
00000000601102D8 336 7 7 shared pool 0
0000000060110238 336 7 6 shared pool 0
0000000060110198 336 7 5 shared pool 0
00000000601100F8 336 7 4 shared pool 0
0000000060110058 336 7 3 shared pool 0
000000006010FFB8 336 7 2 shared pool 0
000000006010FF18 336 7 1 shared pool 1487
7 rows selected.
--//_kghdsidx_count=1.
--//我估計可能某個子池記憶體消耗太多,oracle並不會從別的子池借記憶體使用,導致出現ora-04031錯誤.
--//而sga_target=0的情況下,oracle自動關閉這個特性,不能建立多個子池,這樣一個大池子出現ora-04031錯誤機率自然降低了.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2305567/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20190507]sga_target=0注意修改_kghdsidx_count設定.txt
- 如何解決ORA-04031 錯誤(轉)
- ORA-04031錯誤導致當機案例分析
- [20190104]bbed手工插入資料.txt
- [20190104]bbed手動修改資料.txt
- [20201209]模擬ora-04031的測試例子.txt
- [20190104]ipcs檢視共享記憶體段.txt記憶體
- [20190225]ORA-07217錯誤.txt
- [20190415]ora-02049錯誤.txt
- 20201215]記錄工作中的錯誤.txt
- [20180302]使用find命令小錯誤.txt
- [20181219]記錄自己工作中的錯誤.txt
- C中的匯流排錯誤和段錯誤
- 2152: 【例8.2】成績 【設定的程式碼塊 是否錯誤】
- [20181031]模擬ora-01591錯誤.txt
- [20181122]模擬ORA-08103錯誤.txt
- [20180904]工作中一個錯誤.txt
- [20180428]DNS與ORA-12154錯誤.txtDNS
- [20181106]模擬ora-00600[4194]錯誤.txt
- [20181204]模擬ora-00600[4194]錯誤.txt
- [20181204]模擬ora-00600[4193]錯誤.txt
- [20190918]shrink space與ORA-08102錯誤.txt
- [20190427]表改名與ora-14047錯誤.txt
- 七、Spring Boot 錯誤處理原理 & 定製錯誤頁面Spring Boot
- thinkphp 設定執行目錄為/public後 404錯誤PHP
- Promise基礎(消化錯誤和丟擲錯誤)Promise
- [20221125]設定hugepages遇到的問題.txt
- win10系統設定登入錯誤次數及鎖定賬戶的方法Win10
- 錯誤和異常 (一):錯誤基礎知識
- 前端的水平線,錯誤處理和除錯前端除錯
- async和await的錯誤捕獲AI
- SQL未明確定義列錯誤SQL
- zblog新增html後臺出錯,zblog後臺設定固定域名繫結錯誤HTML
- 解決chkconfig設定開機啟動時出現missing LSB的錯誤
- [20230224]bbed設定偏移技巧.txt
- [20201221]spfile設定問題.txt
- 錯誤記錄:apache預設網頁訪問錯誤Apache網頁
- 錯誤碼設計思考