查詢等待事件(wait event)相關的SQL - v$session_wait, v$rowcache,v$sqltext
select event,count(*) from gv$session_wait group by event order by count(*) desc;
select * from v$session_wait where event = 'row cache lock' ;
select sid from v$rowcache where cache#=7 ;
查詢相關的SQL:
select /*+ ORDERED */ sql_text
from v$sqltext a
where (a.hash_value,a.ADDRESS) in
( select decode(sql_hash_value,0,PREV_HASH_VALUE,sql_hash_value),
decode(sql_hash_value,0,PREV_SQL_ADDR,SQL_ADDRESS)
from v$session b
where b.sid in (select sid from v$session_wait where event = 'row cache lock' ) )
order by piece asc ;
批次kill session 的sql :
select 'alter system kill session '''||sid||','||serial#||''' ;' from v$session where
sid in (select sid from v$session_wait where event = 'row cache lock' ) and type='USER' ;
where sess.PADDR = pro.ADDR and sess.sid in
(
select sid from v$session where
sid in (select sid from v$session_wait where event = 'row cache lock' ) and type='USER'
) ;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-755108/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- v$session_wait 相關SessionAI
- v session_wait v session_event v system_eventSessionAI
- v$session_event , v$system_event , v$session_waitSessionAI
- v$session_wait和v$session_event檢視SessionAI
- 幾個重要檢視(V$SYSTEM_EVENT V$SESSION_EVENT V$SESSION_WAIT)SessionAI
- Oracle等待檢視v$session_waitOracleSessionAI
- V$SESSION_WAITSessionAI
- v$sql,v$sqlarea,v$sqltext區別SQL
- Oracle V$SESSION_WAITOracleSessionAI
- 10.25 V$SESSION_WAITSessionAI
- 檢視 v$sql,v$sqlarea,$sqltext,v$sqltext_with_newlines 的差異SQL
- 關於v$session_wait 表的運用SessionAI
- (轉):學習Oracle動態效能表-(9)-V$SESSION_WAIT,V$SESSION_EVENTOracleSessionAI
- v$sqlarea,v$sql,v$sqltext的區別和聯絡SQL
- v$sqlarea,v$sql,v$sqltext三個檢視的區別SQL
- v$sqlarea,v$sql,v$sqltext的區別和聯絡(zt)SQL
- Oracle9i中v$sql、v$sqlarea、v$sqltext、v$sql_plan的聯絡與區別OracleSQL
- v$session/v$process檢視涉及的相關會話資訊的查詢Session會話
- 顯示v$sqltext中完整的sql資訊SQL
- oracle wait event 等待事件OracleAI事件
- [ZT]v$sqlarea,v$sql,v$sqltext這三個檢視提供的sql語句有什麼區別SQL
- Oracle 等待事件V$檢視Oracle事件
- 動態檢視學習之v$session_waitSessionAI
- zt_eygle大師_如何與io相關的wait event等待事件AI事件
- v$session - 你看到的event真的是session當前的等待事件麼?Session事件
- 學習動態效能表(六)-(1)-V$SESSION_WAITSessionAI
- 等待事件 (wait event) [final]事件AI
- oracle10g_v$sqltext之對等檢視v$sqltext_with_newlinesOracleSQL
- log buffer space wait event等待事件AI事件
- v$asm 相關的viewASMView
- Oracle中資料字典快取V$ROWCACHEOracle快取
- V$SESSION.STATUS='ACTIVE' AND WAIT_EVENT='Idle'SessionAI
- V$SQL、V$SQLSTATS、V$SQLAREASQL
- V$sql_text v$sqlarea v$sql 的區別SQL
- (轉):學習Oracle動態效能表-(7)-V$SQLTEXT,V$SQLAREAOracleSQL
- Oracle動態效能檢視學習之v$sqltext & v$sqlareaOracleSQL
- [轉]學習Oracle動態效能表-(6)-V$SQLTEXT,V$SQLAREAOracleSQL
- 學習動態效能表(16)--V$ROWCACHE