Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: which row is locked?

Re: which row is locked?

From: Mark D Powell <markp7832_at_my-deja.com>
Date: Mon, 11 Dec 2000 19:31:07 GMT
Message-ID: <913a1r$pf7$1@nnrp1.deja.com>

In article <9130lo$h2r$1_at_nnrp1.deja.com>,   steveee_ca_at_my-deja.com wrote:
> Hi David,
>
> If you're trying to find which row is causing contention, you can use
> V$SESSION..look at these columns:
>
> ROW_WAIT_OBJ#
> ROW_WAIT_FILE#
> ROW_WAIT_BLOCK#
> ROW_WAIT_ROW#
>
> I hope this helps.
>
> Steve
>
> In article <912q5k$5in$1_at_mailint03.im.hou.compaq.com>,
> "david spaisman" <david.spaisman_at_compaq.com> wrote:
> > Hello:
> >
> > The application I am working with runs on Oracle 8.1.6.00.
> >
> > I have seen several scripts which can tell me which object is locked
 by
> > user. What would be more helpful would be:
> >
> > how can I tell which row is locked by a particular process?
> >
> > Does any one know how I can tell which row for an object is locked
 by
 which
> > user?
> >
> > Any information you can provide will be greatly appreciated. Thanks.
> >
> > David Spaisman
> >

The v$session columns will contain rowid information only if the session is waiting on a locked row. The columns will be empty if the session is waiting on a resource.

View v$lock will show all objects locked by a session, but there is no place in the SGA where Oracle keeps row level lock information for all row level locks held by the locking session. Oracle keeps row level lock information in the Oracle data block transaction work area so the only way to see if a row, which has no waiting sessions, is locked is to query it.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Dec 11 2000 - 13:31:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US