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: finding a session that is running a sql

Re: finding a session that is running a sql

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 11 May 2007 10:16:14 -0700
Message-ID: <1178903773.903974.224420@e65g2000hsc.googlegroups.com>


On May 11, 11:59 am, Mladen Gogala <mgogala.SPAM..._at_not-at- verizon.net> wrote:
> On Fri, 11 May 2007 06:31:58 -0700, Ben wrote:
> > 9.2.0.5 EntEd AIX5L
>
> > I have a SQL that is consistently being executed 5.5 million times per
> > day and we can't figure out what it is that is running it. I'm crossing
> > v$session and v$sqlarea for the statements hash value and no session
> > ever comes up for it. I'm watching the executions in v$sqlarea growing
> > but can't match it to a session while it's growing. Any ideas on a
> > better method to figure out who/what is executing this sql?
>
> I would try V$OPEN_CURSOR. It has SID, ADDRESS, HASH and SQL_ID (10g)
> columns. If you have SQL ADDRESS & HASH, it should be trivial to identify
> SID for sessions that have that cursor open. Of course, V$OPEN_CURSOR
> table describes the SQL statements that cause you to curse, thus the
> name.
>
> --http://www.mladen-gogala.com

LOL about the "Of course, V$OPEN_CURSOR table describes the SQL statements that cause you to curse, thus the name."

Unfortunately, often true.

Received on Fri May 11 2007 - 12:16:14 CDT

Original text of this message

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