Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

find out the user that locked a specific row

BeilstwhJul 27 2017 — edited Oct 16 2017

I know that I can find out who has a row locked by having another session try to grab the same row and then look at v$lock for a blocked record. However what I would like to do is check a specific row whose primary key I know, to see if it is locked and determine who has it locked. You can determine the ROWID of the specific row by using the ROWID pseudo column. The transaction number of the session that locked a specific row is stored in the block header. Using the transaction id you can use the v$transaction to get the session ID and with the session ID you can use the v$session view to get the user information.

The only information that I can't find is the information from the block for locking transactions.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 13 2017
Added on Jul 27 2017
18 comments
10,421 views