Re: Who is locking the row I want?

From: David Randolph - Shared Logic Inc. <sli_at_crash.cts.com>
Date: Wed, 4 May 1994 22:55:28 GMT
Message-ID: <CpAvoK.8Lz_at_crash.cts.com>


Doug Bitting (dbitting_at_us.oracle.com) wrote:

: >>>>> On Tue, 3 May 94 09:11:58 +0100, jna_at_astrakan.se (Johan Andersson)
: >>>>> said:
 

: Johan> How do I identify the session that holds a lock on a specific
: Johan> row in a table? Is it possible in Oracle7?
 

: Connecting to an Oracle 7.0.15 database, I can do the following:
 

: --- snip here ---
: SQLDBA> insert into scott.footest values (1);
: 1 row processed.
: SQLDBA> select osuser from v$session
: 2> where sid in
: 3> (select sid from v$lock
: 4> where id1 = (select object_id from dba_objects
: 5> where object_name = 'FOOTEST'
: 6> and owner = 'SCOTT'));
: OSUSER
: ----------
: dbitting
: 1 row selected.
: --- snip here ---
 

: In this particular example, I use "in" on line 2> because it's possible
: that more than one person could have a lock on the table footest.
 

: Hope this helps.
: --Doug
: --
: Doug Bitting || Oracle Corporation || dbitting_at_oracle.com
: Worldwide Technical Support || Apple Desktop Products Group
: All opinions expressed in this article are my own and may not
: reflect those of Oracle Corporation.
Received on Thu May 05 1994 - 00:55:28 CEST

Original text of this message