通過v$sql_bind_capture和dba_hist_sqlbind關聯診斷gc事件

hurp_oracle發表於2014-11-11
通常RAC叢集裡面出到GC事件,我們需要查詢出哪個語句導致,這樣的情況下我可以考慮用繫結變數值來判斷
SELECT  SQL_ID, NAME, VALUE_STRING, LAST_CAPTURED
  FROM DBA_HIST_SQLBIND
 WHERE SQL_ID in
       (select distinct sql_id from v$session where event = '&event')
   AND NAME = ':REGION'
   and instance_number = '&INST_ID'
   and value_string not in ('&region1', '&region2')
union
select sql_id, name, value_string,last_captured 
  from v$sql_bind_capture
 where sql_id in 
       (select distinct sql_id from v$session where event = '&event')
   and NAME = ':REGION' and value_string not in ('&region);

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

相關文章