Identify index key entry by rowid [message #659438] |
Tue, 17 January 2017 04:02 |
michael_bialik
Messages: 621 Registered: July 2006
|
Senior Member |
|
|
Hi, I got a question:
Is it possible to identify locked INDEX ENTRY using information from V$SESSION ( row_wait_obj#, row_wait_file#, row_wait_block# and row_wait_row#)?
It's easily done for table ( by using DBMS_ROWID package ), but what about index?
Oracle SE 11.2.0.4.0
Michael
[Updated on: Tue, 17 January 2017 04:03] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: Identify index key entry by rowid [message #659606 is a reply to message #659553] |
Tue, 24 January 2017 01:11 |
michael_bialik
Messages: 621 Registered: July 2006
|
Senior Member |
|
|
I have a locking/blocking issues (from time to time). When blocking occurs I see (at V$SESSION view) values in following columns:
Row_Wait_Obj#
Row_Wait_File#
Row_Wait_BLock#
Row_Wait_Row#
If Row_Wait_Obj# points to table, I'm able using DBMS_ROWID package to identify the locked row and to retrieve it's data, however it's not possible when Row_Wait_Obj# point to index.
So I wandered if someone have any idea about it.
Michael
P.S. It's regular B-tree indexes
[Updated on: Tue, 24 January 2017 01:12] Report message to a moderator
|
|
|
|
Re: Identify index key entry by rowid [message #659608 is a reply to message #659607] |
Tue, 24 January 2017 03:57 |
michael_bialik
Messages: 621 Registered: July 2006
|
Senior Member |
|
|
Right now I got an example(still for tables):
SELECT s.inst_id, s.sid, s.serial#, s.event#, s.event, s.blocking_instance blk_i, s.blocking_session blk_s,
row_wait_obj# obj, o.owner, o.object_name, o.object_type type,
s.row_wait_file# file, s.row_wait_block# block, s.row_wait_row# row
FROM gv$session s
LEFT JOIN dba_objects o ON o.object_id = s.row_wait_obj#
WHERE blocking_session IS NOT NULL
Inst_ID sid serial# event# event blk_i blk_s obj object_name type file block row
1 1753 17369 241 enq: TX - row lock contention 1 214 103409 RM_NUMERATORS TABLE 1024 12186676 1
1 1680 27371 241 enq: TX - row lock contention 1 214 103409 RM_NUMERATORS TABLE 1024 12186676 1
1 1087 58331 241 enq: TX - row lock contention 1 214 103409 RM_NUMERATORS TABLE 1024 12186676 1
And yes - I got "enq: TX - index contention" when indexes are involved (in that case I got an index name in object_name column and the same values for file/block/row columns )
[Updated on: Tue, 24 January 2017 04:03] Report message to a moderator
|
|
|
|
|
|