用markhot緩解library cache:mutex x
1. ora event 出現大量的library cache: mutex X,且除此等待之外,其他等待較少或沒有。
2.透過查詢v$session中library cache: mutex X等待會話的p1值。
Select p1,count(*) from v$session where event=’ library cache :mutex X’ group by p1 order by 2 asc;
3.透過該p1值查出是在什麼物件上出現爭用。
Set wrapped on
Select case when (kglhdadr = kglhdpar) then 'Parent' else 'Child '||kglobt09 end cursor,
kglhdadr ADDRESS,substr(kglnaobj,1,20) name, kglnahsh hash_value,kglobtyd type,kglobt23 LOCKED_TOTAL,kglobt24 PINNED_TOTAL,kglhdexc EXECUTIONS,kglhdnsp NAMESPACE
from x$kglob where kglnahsh = '&p1';
4. 使用 DBMS_SHARED_POOL.MARKHOT方式,把xxxxx物件標記為熱。(注意不要標記同義詞物件,11g及11g以下會觸發bug)
1)標記物件為熱物件:
DBMS_SHARED_POOL.MARKHOT (
schema VARCHAR2,
objname VARCHAR2,
namespace NUMBER DEFAULT1, global BOOLEAN DEFAULT TRUE);
例如:exec dbms_shared_pool.markhot('xxxx','xxxxx',1);
2)也可以直接標記sql為熱物件,主要為cursor級別標記:
DBMS_SHARED_POOL.MARKHOT (
hash VARCHAR2,
namespace NUMBER DEFAULT 1,
global BOOLEAN DEFAULTTRUE);
在SQL HASH VALUE的時候是16-byte hash value for the object
select kglnahsv from x$kglob where kglnahsh=&p1 and kglhdadr =kglhdpar;
exec DBMS_SHARED_POOL.MARKHOT(hash => ‘xxxxxx’, namespace => 0);
6. 檢查熱物件複製是否成功複製(至少觀察3-5分鐘):
Set wrapped on
SELECT * FROM v$db_object_cache where name=’xxxxx’;
Or
SELECT * FROM v$db_object_cache where hash_value=’xxxxxx’;
Makhot回退步驟:
當makhot物件之後出現異常之後可以使用以下語句回退,該過程時間可能出現較長:
exec dbms_shared_pool.unmarkhot('xxxx','xxxxx',1);
exec DBMS_SHARED_POOL.UNMARKHOT(hash => ‘xxxxxx’, namespace => 0);
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29863023/viewspace-2132959/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Library cache mutex x tipsOracleMutex
- library cache: mutex X引發的故障Mutex
- [20170727]library cache: mutex X.txtMutex
- Library Cache: Mutex X – Bug 20879889 – Fixed in 11.2.0.4Mutex
- oracle11g library cache-mutex x的處理測試OracleMutex
- 'cursor:mutex ..'/ 'cursor:pin ..'/ 'library cache:mutex ..'型別的等待事件Mutex型別事件
- [20201203]探究library cache mutex X 3.txtMutex
- [20190402]Library Cache mutex.txtMutex
- 故障:核心表業務高峰期授權導致library cache lock和mutex x競爭Mutex
- 定位Library Cache pin,Library Cache lock等待的解決方法
- 解決Library Cache latchs
- zt_如何平面解決library cache lock和library cache pin
- sql version count引發cursor:pin s wait x及library cache latch library cache lockSQLAI
- Library Cache Pin 及 Library Cache Lock分析
- library cache lock和library cache pin理解
- 解決library cache pin等待事件事件
- Library cache lock/pin詳解(轉)
- oracle library cache之library cache lock_library cache pin wait event釋義OracleAI
- [20220301]oracle如何定位使用library cache mutex.txtOracleMutex
- [20220303]oracle如何定位使用library cache mutex 3.txtOracleMutex
- [20220304]測試library cache mutex遇到的疑問.txtMutex
- library cache lock和cursor: pin S wait on X等待AI
- Oracle Library cacheOracle
- Library cache內部機制詳解
- 分析解決因”library cache pin”等待
- Oracle:cursor:mutex XOracleMutex
- [20220302]oracle如何定位使用library cache mutex 2.txtOracleMutex
- library cache pin和library cache lock的診斷分析
- library cache lock和library cache pin區別總結
- 淺談library cache裡的爭用(一)
- library cache pin/lock的解決辦法
- Oracle Library cache內部機制詳解Oracle
- [Oracle]--Library cache lock 故障解決一例Oracle
- 記一次library cache pin事件解決事件
- 【等待事件】library cache pin事件
- 等待事件--library cache pin事件
- library cache pin等待分析
- LIBRARY CACHE LOCK 等待事件事件