oracle awr快照點不記錄問題

wanglinghua0907發表於2023-12-26

alert日誌裡發現

Suspending MMON slave action kermrfsa_ for 82800 seconds

mmon的trc

KEWRAFC: Flush slave failed, AWR Enqueue Timeout



手動建快照點

exec dbms_workload_repository.create_snapshot;


等待為

reliable message



reliable message的方法

在 v$event_name 檢視中,我們可以找到該事件的三個引數的含義,三個引數分別代表 channel context ,

channel handle ,broadcast message,獲得這三個引數,就能夠做出一定的判斷:


SQL> select name,parameter1,parameter2,parameter3 

from v$event_name where name='reliable message';

NAME   PARAMETER1 PARAMETER2 PARAMETER3

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

reliable message  channel context       channel handle          broadcast message


例如:在出現等待時,透過以下查詢,獲得 reliable message 的 P1 引數:


select to_char(p1, 'XXXXXXXXXXXXXXXX') event_param,

 count(*), sum(time_waited/1000000) time_waited

from gv$active_session_history

where event = 'reliable message'

group by to_char(p1, 'XXXXXXXXXXXXXXXX')

order by time_waited desc;


EVENT_PARAM                                           COUNT(*) TIME_WAITED

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

       3CCF8A1D8                                          572  904.548231

       3CCF96200                                          109   69.145101

       3CCF9AFF0                                           54   23.987554


透過 x$ksrcdes 可以找到 P1 引數代表的通道資訊:


select name_ksrcdes

from x$ksrcdes

where indx = (select name_ksrcctx from x$ksrcctx where addr like '%&addr%');

SQL> /

Enter value for addr: 3CCF8A1D8

NAME_KSRCDES

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

RBR channel


進一步的透過 GV$CHANNEL_WAITS 可以檢視資料庫的各種類等待。


SELECT CHANNEL,

  SUM(wait_count) sum_wait_count

FROM GV$CHANNEL_WAITS

GROUP BY CHANNEL

ORDER BY SUM(wait_count) DESC;


CHANNEL                                                            SUM_WAIT_COUNT

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

Result Cache: Channel                                                   429264591



這個問題是結果集快取的Bug導致的,Bug號為19557279,該問題在Oracle 12.2版本中修復 。參考:

Very High Waits for ‘reliable message’ After Upgrade to 11.2.0.4 When Using Result Cache (Doc ID 1951729.1)


如果未使用結果集快取特性,可以透過臨時關閉來解決:

SQL> alter system set result_cache_max_size=0;

 

System altered.


最終發現

MMON remote action broadcast channel


kill掉mmon程式


啟停限制會話(會造成業務連不進來一下)

ALTER SYSTEM enable restricted session;

ALTER SYSTEM disable restricted session;


來自 “ ITPUB部落格 ” ,連結:https://blog.itpub.net/69980685/viewspace-3001684/,如需轉載,請註明出處,否則將追究法律責任。

相關文章