ORACLE lock 轉貼
V$LOCK
This view lists the locks currently held by the Oracle database server and outstanding requests for a lock or latch.
Column Datatype Description
ADDR
RAW(4 | 8)
Address of lock state object
KADDR
RAW(4 | 8)
Address of lock
SID
NUMBER
Identifier for session holding or acquiring the lock
TYPE
VARCHAR2(2)
Type of user or system lock
The locks on the user types are obtained by user applications. Any process that is blocking others is likely to be holding one of these locks. The user type locks are:
TM - DML enqueue
TX - Transaction enqueue
UL - User supplied
The locks on the system types are held for extremely short periods of time. The system type locks are listed in Table 3-1.
ID1
NUMBER
Lock identifier #1 (depends on type)
ID2
NUMBER
Lock identifier #2 (depends on type)
LMODE
NUMBER
Lock mode in which the session holds the lock:
0 - none
1 - null (NULL)
2 - row-S (SS)
3 - row-X (SX)
4 - share (S)
5 - S/Row-X (SSX)
6 - exclusive (X)
REQUEST
NUMBER
Lock mode in which the process requests the lock:
0 - none
1 - null (NULL)
2 - row-S (SS)
3 - row-X (SX)
4 - share (S)
5 - S/Row-X (SSX)
6 - exclusive (X)
CTIME
NUMBER
Time since current mode was granted
BLOCK
NUMBER
The lock is blocking another lock
Table 3-1 Values for the TYPE Column: System Types
System Type Description System Type Description
BL
Buffer hash table instance
NA..NZ
Library cache pin instance (A..Z = namespace)
CF
Control file schema global enqueue
PF
Password File
CI
Cross-instance function invocation instance
PI, PS
Parallel operation
CU
Cursor bind
PR
Process startup
DF
Data file instance
QA..QZ
Row cache instance (A..Z = cache)
DL
Direct loader parallel index create
RT
Redo thread global enqueue
DM
Mount/startup db primary/secondary instance
SC
System commit number instance
DR
Distributed recovery process
SM
SMON
DX
Distributed transaction entry
SN
Sequence number instance
FS
File set
SQ
Sequence number enqueue
HW
Space management operations on a specific segment
SS
Sort segment
IN
Instance number
ST
Space transaction enqueue
IR
Instance recovery serialization global enqueue
SV
Sequence number value
IS
Instance state
TA
Generic enqueue
IV
Library cache invalidation instance
TS
Temporary segment enqueue (ID2=0)
JQ
Job queue
TS
New block allocation enqueue (ID2=1)
KK
Thread kick
TT
Temporary table enqueue
LA .. LP
Library cache lock instance lock (A..P = namespace)
UN
User name
MM
Mount definition global enqueue
US
Undo segment DDL
MR
Media recovery
WL
Being-written redo log instance
This view lists the locks currently held by the Oracle database server and outstanding requests for a lock or latch.
Column Datatype Description
ADDR
RAW(4 | 8)
Address of lock state object
KADDR
RAW(4 | 8)
Address of lock
SID
NUMBER
Identifier for session holding or acquiring the lock
TYPE
VARCHAR2(2)
Type of user or system lock
The locks on the user types are obtained by user applications. Any process that is blocking others is likely to be holding one of these locks. The user type locks are:
TM - DML enqueue
TX - Transaction enqueue
UL - User supplied
The locks on the system types are held for extremely short periods of time. The system type locks are listed in Table 3-1.
ID1
NUMBER
Lock identifier #1 (depends on type)
ID2
NUMBER
Lock identifier #2 (depends on type)
LMODE
NUMBER
Lock mode in which the session holds the lock:
0 - none
1 - null (NULL)
2 - row-S (SS)
3 - row-X (SX)
4 - share (S)
5 - S/Row-X (SSX)
6 - exclusive (X)
REQUEST
NUMBER
Lock mode in which the process requests the lock:
0 - none
1 - null (NULL)
2 - row-S (SS)
3 - row-X (SX)
4 - share (S)
5 - S/Row-X (SSX)
6 - exclusive (X)
CTIME
NUMBER
Time since current mode was granted
BLOCK
NUMBER
The lock is blocking another lock
Table 3-1 Values for the TYPE Column: System Types
System Type Description System Type Description
BL
Buffer hash table instance
NA..NZ
Library cache pin instance (A..Z = namespace)
CF
Control file schema global enqueue
PF
Password File
CI
Cross-instance function invocation instance
PI, PS
Parallel operation
CU
Cursor bind
PR
Process startup
DF
Data file instance
QA..QZ
Row cache instance (A..Z = cache)
DL
Direct loader parallel index create
RT
Redo thread global enqueue
DM
Mount/startup db primary/secondary instance
SC
System commit number instance
DR
Distributed recovery process
SM
SMON
DX
Distributed transaction entry
SN
Sequence number instance
FS
File set
SQ
Sequence number enqueue
HW
Space management operations on a specific segment
SS
Sort segment
IN
Instance number
ST
Space transaction enqueue
IR
Instance recovery serialization global enqueue
SV
Sequence number value
IS
Instance state
TA
Generic enqueue
IV
Library cache invalidation instance
TS
Temporary segment enqueue (ID2=0)
JQ
Job queue
TS
New block allocation enqueue (ID2=1)
KK
Thread kick
TT
Temporary table enqueue
LA .. LP
Library cache lock instance lock (A..P = namespace)
UN
User name
MM
Mount definition global enqueue
US
Undo segment DDL
MR
Media recovery
WL
Being-written redo log instance
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/751371/viewspace-569131/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE LOCK,LATCH,PINOracle
- ORACLE LOCK MODE 1.2.3.4.5.6Oracle
- ORACLE基礎之oracle鎖(oracle lock mode)詳解Oracle
- 【轉】spin lock 和mutexMutex
- Oracle RAC Cache Fusion 系列十:Oracle RAC Enqueues And Lock Part 1OracleENQ
- 【TUNE_ORACLE】等待事件之“library cache lock”Oracle事件
- oracle ORA-01157: cannot identify/lock data file 64OracleIDE
- Oracle Enqueues Wait Events 三 enq: TX - row lock contentionOracleENQAI
- (轉貼)Out of Memory: Killed process
- mysql metadata lock後設資料鎖之鎖狀態lock_status流轉圖MySql
- ORACLE TEXT(轉)Oracle
- ORACLE EVENTS(轉)Oracle
- Oracle Partitioning(轉)Oracle
- ORACLE DSI(轉)Oracle
- Oracle 轉MySqlOracleMySql
- oracle資料庫事務transaction鎖lock模式思考之一Oracle資料庫模式
- oracle資料庫事務transaction 不同的鎖lock型別Oracle資料庫型別
- idea無法黏貼_IntelliJ Idea 複製貼上的問題(轉載)IdeaIntelliJ
- [轉貼][php擴充套件-amqp]安裝PHP套件MQ
- oracle轉義字元Oracle字元
- Java初探Oracle(轉)JavaOracle
- ORACLE FREELIST HWM(轉)Oracle
- oracle列轉行Oracle
- oracle myintis 轉義Oracle
- Oracle轉換PostgresOracle
- oracle cache table(轉)Oracle
- Oracle審計(轉)Oracle
- Oracle Pipelined Table(轉)Oracle
- oracle事務transaction鎖lock一點兒小思考或總結Oracle
- 【ASK_ORACLE】LOCK_SGA引數失效的解決辦法Oracle
- Linux核心同步機制之(五):Read Write spin lock【轉】Linux
- Oracle實驗(02):轉換 & 轉譯Oracle
- Oracle 11g 密碼延遲認證與 library cache lock 等待Oracle密碼
- ORACLE系統概述(轉)Oracle
- Oracle 特殊字元轉義Oracle字元
- Oracle 查詢轉換Oracle
- ORACLE資料加密(轉)Oracle加密
- ORACLE備份策略(轉)Oracle
- Oracle Pipelined Table Functions(轉)OracleFunction