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: LOCK STATEMENT

Re: LOCK STATEMENT

From: <selvagam_at_my-deja.com>
Date: Tue, 26 Oct 1999 21:18:06 GMT
Message-ID: <7v55qb$lk8$1@nnrp1.deja.com>


Please modify for your needs. Hope this helps you.

Query



select distinct ses.sid, ses.serial#, ses.machine, ses.username||'('||ses.sid||')' users, acc.owner owner,

           acc.object object, ses.lockwait, txt.sql_text sqltext   from v$sqltext txt, v$access acc, v$session ses, v$lock  where txt.address = ses.sql_address

  and    txt.hash_value   = ses.sql_hash_value
  and    ses.sid          = acc.sid
  and    ses.lockwait     is not null

  and ses.sid = v$lock.sid
  and upper(txt.sql_text) like '%UPDATE%' /

Thanks
Leo

In article <3815F18C.311A112D_at_br.oracle.com>,   William de Souza Alencar <walencar_at_br.oracle.com> wrote:
> This is a multi-part message in MIME format.
> --------------F847BC986012CB99F6E97251
> Content-Type: text/plain; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
>
> Hi guys,
>
> I´m using ORACLE8 and I´d like to find out which SQL STATEMENT is
> locking a TABLE on database.
>
> Example, when some user instance "UPDATE EMP SET SAL = 10" a lock
will
> be generated into V$LOCK.
>
> How can I recover this statement from V$ TABLES ?
>
> Thanks in advance,
>
> WILL,
>
> --------------F847BC986012CB99F6E97251
> Content-Type: text/x-vcard; charset=us-ascii;
> name="walencar.vcf"
> Content-Transfer-Encoding: 7bit
> Content-Description: Card for William de Souza Alencar
> Content-Disposition: attachment;
> filename="walencar.vcf"
>
> begin:vcard
> n:Alencar;William
> tel;work:55 61 327-5151
> x-mozilla-html:TRUE
> org:ORACLE SUPPORT SERVICES;<img

src=http://www.geocities.com/TheTropics/3068/oraani.gif><br>
> adr:;;;;;;Brazil
> version:2.1
> email;internet:walencar_at_br.oracle.com
> title:Field Support Analyst
> fn:William de Souza Alencar
> end:vcard
>
> --------------F847BC986012CB99F6E97251--
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Oct 26 1999 - 16:18:06 CDT

Original text of this message

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