oracle session阻塞查詢
---------- -- ---------- ---------- ---------- ---------- ----------
1644 TM 51148 0 6 0 1
1632 TM 51148 0 0 6 0
SQL>
SQL>
SQL> select ( select username from v$session where sid=a.sid) blocker , a.sid, (select username from v$session where sid=b.sid) blockee, b.sid from v$lock a , v$lock b where a.id1=b.id1 and a.id2 = b.id2 and a.block=1 and b.request > 0;
------------------------------ ---------- ------------------------------ ----------
SCOTT 1644 SCOTT 1632
V$LOCK
This view lists the locks currently held by the Oracle Database 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 . |
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:
|
REQUEST | NUMBER | Lock mode in which the process requests the lock:
|
CTIME | NUMBER | Time since current mode was granted |
BLOCK | NUMBER | A value of either 0 or 1, depending on whether or not the lock in question is the blocker. |
Table 6-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 | datafile 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 change 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/27042095/viewspace-773725/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle阻塞會話查詢Oracle會話
- Oracle阻塞(鎖等待)查詢Oracle
- Oracle中查詢阻塞與被阻塞SID的方法Oracle
- 查詢阻塞與被阻塞SQL語句SQL
- Oracle中診斷阻塞的sessionOracleSession
- MySQL查詢阻塞語句MySql
- 查詢oracle比較慢的session和sqlOracleSessionSQL
- Oracle10g中阻塞鎖查詢更簡單Oracle
- 查殺oracle的阻塞Oracle
- 查詢等待的sessionSession
- SQL Server阻塞查詢語句SQLServer
- 查詢oracle比較慢的session和SQL[轉]OracleSessionSQL
- 查詢引起Oracle阻塞事件的源頭語句的方法Oracle事件
- 一條查詢Oracle中的阻塞鎖(以及阻塞在哪個資料上)的SQLOracleSQL
- SQLServer DML操作阻塞SELECT查詢SQLServer
- row lock contention 阻塞程式查詢
- library cache lock 阻塞程式查詢
- library cache pin 阻塞程式查詢
- RAC環境中的阻塞 查詢鎖
- oracle會話阻塞查詢指令碼及對應欄位含義Oracle會話指令碼
- Oracle 查詢某個session正在執行的sql語句OracleSessionSQL
- Oracle中診斷阻塞session的方法 blocking errorOracleSessionBloCError
- blocking_session阻塞BloCSession
- 使用 strace 查詢 Emacs 啟動阻塞的原因Mac
- HighgoDB查詢慢SQL和阻塞SQLGoSQL
- Waiting for table阻塞查詢的問題AI
- 查詢session被鎖的sql(轉)SessionSQL
- Oracle 查詢Oracle
- 檢視引起阻塞的SessionSession
- oracle觸發器執行使用者和v$session的查詢Oracle觸發器Session
- 連結伺服器查詢導致的阻塞伺服器
- 如何查詢以往的session歷史資訊Session
- 使用者查詢當前session IDSession
- oracle 精確查詢和模糊查詢Oracle
- oracle子查詢Oracle
- Oracle 日期查詢Oracle
- oracle 樹查詢Oracle
- ORACLE SCN 查詢Oracle