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: How to get locked rows for a given table ?

Re: How to get locked rows for a given table ?

From: Vos nom et prénom <sylvainm_at_infonie.be>
Date: 1997/02/12
Message-ID: <01bc1917$fa95e140$14c9c00a@8619hxr24256>#1/1

Hi Michael,

As far as I know, there is no way in Oracle to know which rows of a table are locked.
What you can see is the type of lock(s) being held by sessions on a object. To see this, you can launch, as sys, the $ORACLE_HOME/rdbms/admin/catblock.sql script which will provide you some views to see who is locking what (dba_locks, dba_ddl_locks, dba_dml_locks, dba_blockers, dba_waiters + v$lock).
But you will not see the locked rows : in fact, a row lock is a "hidden" byte in each physical row that you can find in a db block. And just think at the space that would be needed to store locking information over thousands or millions of rows ...

Greetings,

Sylvain Momin
Oracle DBA
email's : sylvainm_at_infonie.be - sylvain.momin_at_is.belgacom.be

michael_at_isv-gmbh.de a écrit dans l'article <32FF1DAF.6071_at_isv-gmbh.de>...
> I like to determine the locked rows for a table. But I don't have enough
> info on the *$ (system) tables... I'd like to have a SQL-Statement or a
> PROCEDURE that accepts a table name and returns a vector (or a table).
>
> I don't want to use SELECT ... NOWAIT ! This requires a table scan. The
> table is too big to be scanned at least once in two minutes.
>
> replies via email preferred - thanks.
>
  Received on Wed Feb 12 1997 - 00:00:00 CST

Original text of this message

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