Is it possible to determine who is locking (not blocking) a row in an Oracle database?
This relates to a problem I have with a COBOL program that needs to determine who is locking a requested record. I can determine the rowid of the requested record (after Oracle has informed the program that the requested record is locked by another user), and then need to be able to display to the requesting user the details of who is locking the record.
I know that there are methods available to determine who is blocking a requested a lock, but these do not suit the purposes of this COBOL program.
The COBOL logic flow is as follows:
select <data> from table where <condition> for update nowait
(Oracle returns error code -54)
select rowid from table where <condition>
I would now like to use rowid to determine who holds the lock on this record.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!