Oracle Enqueues Wait Events 一
Oracle Enqueue Names
Enquences 是為了管理 連續訪問資料庫資源而設計的一種共享記憶體結構也叫鎖。它們可以與會話或事務相關聯。Enquences 名顯示在DBA_LOCK和DBA_LOCK_INTERNAL資料字典檢視的LOCK_TYPE列中。
資源被唯一地標識一個物件,該物件可以被一個例項(本地資源)或多個例項之間(全域性資源)的不同會話鎖定。每個想試圖鎖定資源的會話都在該資源上生成一個佇列。
下面是Oracle Enqueues對資源申請的鎖模式和申請資源
Enqueues are usually represented in the format "TYPE-ID1-ID2" where:
"TYPE" is a 2 character text string"ID1" is a 4 byte hexadecimal number
"ID2" is a 4 byte hexadecimal number Parameters:
P1 = Lock Type & Mode
P2 = Lock ID1
P3 = Lock ID2
Lock Type & Mode
The lock type and requested mode are encoded into P1 thus:
Convert P1 into hexadecimal (or use P1RAW) and extract the lock type and requested mode from this by converting the first 2 bytes of the hexadecimal number to ASCII and the second 2 bytes to a number:
Eg: 54580006
^^^^------ Converted to ASCII gives "TX" (0x54 = "T", 0x58 = "X")
^^^^-- 0006 is 6 in decimal so this is a mode 6 request
Note that on UNIX, the command 'man ascii' will display the Octal, hexadecimal, and decimal ASCII character sets to help with the hex translation.
An alternative way to extract this information is to use SQL thus:
SELECT chr(to_char(bitand(p1,-16777216))/16777215)||
chr(to_char(bitand(p1, 16711680))/65535) "Lock",
to_char( bitand(p1, 65535) ) "Mode"
FROM v$session_wait
WHERE event = 'enqueue'
;
Lock ID1
P2 represents ID1 of the enqueue name in decimal.
P2RAW represents ID1 of the enqueue name in hexadecimal.
Lock ID2
P3 represents ID2 of the enqueue name in decimal.
P3RAW represents ID2 of the enqueue name in hexadecimal.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26342786/viewspace-2708713/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Enqueues Wait Events 二OracleENQAI
- Oracle Enqueues Wait Events 三OracleENQAI
- Oracle Enqueues Wait Events 三 enq: TX - row lock contentionOracleENQAI
- Oracle RAC Wait EventsOracleAI
- Oracle RAC Cache Fusion系列十八:Oracle RAC Statisticsand Wait EventsOracleAI
- ORACLE EVENTS(轉)Oracle
- Oracle RAC Cache Fusion 系列十:Oracle RAC Enqueues And Lock Part 1OracleENQ
- oracle等待事件之cursor:pin S wait on XOracle事件AI
- 【go語言】wait,wait for meGoAI
- Oracle10g等待事件型別wait_class說明Oracle事件型別AI
- [20200120]oracle wait event "enq: SQ – contention" and DBA_DB_LINK_SOURCES.txtOracleAIENQ
- Oracle不同版本檢視資料庫session/system級別設定了哪些eventsOracle資料庫Session
- efcore 新特性 SaveChanges Events
- pointer-events屬性
- 你唯一需要的是“Wide Events”,而非“Metrics、Logs、Traces”IDE
- node中事件(events)模組一些用法和原理事件
- wait() vs sleep()AI
- 一題帶你徹底理解sleep()和wait()AI
- JavaScript學習筆記(一) promise和async/waitJavaScript筆記PromiseAI
- CSS3 pointer-eventsCSSS3
- binlog_rows_query_log_events
- Random Events CodeForces - 1461Crandom
- [原始碼解讀]一文徹底搞懂Events模組原始碼
- Golang CLOSE WAIT 分析GolangAI
- Nodejs學習筆記-01 eventsNodeJS筆記
- Server-sent Events 介面壓測Server
- 簡述 Laravel Model Events 的使用Laravel
- 徹底搞懂 Kubernetes 中的 Events
- 【YashanDB知識庫】YAS-02024 lock wait timeout, wait time 0 millisecondsAI
- 一個關於wait/notify與鎖關係的探究AI
- 調整time_waitAI
- 10.25 V$SESSION_WAITSessionAI
- cursor pin S wait on XAI
- [20191223]Wait for Java.txtAIJava
- cursor: pin S wait on XAI
- MXNet: wait_to_read 方法AI
- sleep()和wait()區別AI
- TCP連線的TIME_WAIT和CLOSE_WAIT 狀態解說TCPAI