Table lock Blocking [message #266128] |
Sun, 09 September 2007 22:55 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kflee2000
Messages: 3 Registered: September 2007 Location: SG
|
Junior Member |
|
|
Hi,
I have read the article on 'what's blocking my lock'
and have written a script to check for blocking. However, sometime you will see some blocking but couldn't find the object when occurs. I wonder is this the normal or something got wrong?
eg.
** blocking ** QAD 67
No object found 41 -1
* to select the object_id from request sid, the row_object_id get is -1*
select row_wait_obj# into v_object_id from v$session where sid = v_blk_sid;
Thanks.
|
|
|
|
|
|
Re: Table lock Blocking [message #266163 is a reply to message #266128] |
Mon, 10 September 2007 01:24 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kflee2000
Messages: 3 Registered: September 2007 Location: SG
|
Junior Member |
|
|
Encounter what? "No object found 41 -1"? No I never encounter that.
I already post the code above.
select row_wait_obj# into v_object_id from v$session where sid = v_blk_sid;
(point 3)
Explain:
1. First,get the block from v$lock where is grather than 0.
(to find out any blocking)
2. From v$lock which block >0,use id1,id2 to get sid which is the requesting user. (request >0)
(to find out the requester)
3. Use sid to get the row_wait_obj# (code above).
(to find out the requester object)
Question: Although there is blocking and also requester, when getting the object from request it shown -1 instead of an object_id.
Thanks.
|
|
|
Re: Table lock Blocking [message #266167 is a reply to message #266163] |
Mon, 10 September 2007 01:35 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68678 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Quote: | I already post the code above.
select row_wait_obj# into v_object_id from v$session where sid = v_blk_sid;
|
This does not work:
SQL> select row_wait_obj# into v_object_id from v$session where sid = v_blk_sid;
select row_wait_obj# into v_object_id from v$session where sid = v_blk_sid
*
ERROR at line 1:
ORA-00904: "V_BLK_SID": invalid identifier
Don't explain POST THE CODE.
Quote: | Question: Although there is blocking and also requester, when getting the object from request it shown -1 instead of an object_id.
|
Answer: who say there is blocking? You didn't post anything that proves it And: "read Reference manual about v$session"
WHY DON'T YOU WANT TO POST YOUR CODE?
Regards
Michel
[Updated on: Mon, 10 September 2007 01:37] Report message to a moderator
|
|
|