Re: LOCK STATEMENT

From: Stephan Born <stephan.born_at_beusen.de>
Date: 1999/10/27
Message-ID: <3816BE0B.1153BCA7_at_beusen.de>#1/1


> 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,
Connect as SYSTEM and try a little bit with the following statements:

select * from v$lock;

select * from v$open_cursor where sid = :SID;

SELECT *
FROM V$SQLTEXT
WHERE
    ADDRESS=HEXTORAW(:addr) AND
    HASH_VALUE=TO_NUMBER(:hash)
ORDER BY PIECE Hope it will help, let me know you solution, please.

Regards, Stephan

--
---------------------------------------------------------------
Dipl.-Inf. (FH) Stephan Born   | beusen Consulting GmbH
fon: +49 30 549932-17          | Landsberger Allee 392
fax: +49 30 549932-29          | 12681 Berlin
mailto:stephan.born_at_beusen.de  | Germany
---------------------------------------------------------------
Received on Wed Oct 27 1999 - 00:00:00 CEST

Original text of this message