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: Mladen Gogala <mgogala.SPAM-ME_at_not-at-verizon.net>
Date: Fri, 11 May 2007 17:59:20 +0200 (CEST)
Message-ID: <pan.2007.05.11.15.55.03@not-at-verizon.net>


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
Received on Fri May 11 2007 - 10:59:20 CDT

Original text of this message

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