Re: Q: How do I find the SQL-Statement that is causing a lock

From: Chris Kasten <kasten_at_brookings.net>
Date: 1996/01/16
Message-ID: <30fbfdd7.4604582_at_news.brookings.net>#1/1


pkelley772_at_aol.com (PKelley772) wrote:

>
> >> I would like to track down which SQL Statement is causing an entry in
> >> the V$LOCK Table.
>
> <example snipped>
>
> >>
> >> Is there a way for me to find out which SQL Statement caused these
> >> rows in v$lock to show up ?
>
>
> >You can get SQL_ADDRESS from v$session (using SID from v$lock) and
> >join it to ADDRESS inm v$SQLAREA.
>
> If I'm not mistaken - the sql statement you find using this method is not
> guaranteed to be the locking statement - it is only the most recent sql
> statement for the SID in question.
>

You are correct and I should have stated that. I like the odds tho...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Chris Kasten
Programmer/Analyst (among others...)

#include <sys/std_disclaimer.h>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Received on Tue Jan 16 1996 - 00:00:00 CET

Original text of this message