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: 11 May 2007 15:34:07 GMT
Message-ID: <46448cef$0$1341$834e42db@reader.greatnowhere.com>


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?

V$OPEN_CURSOR contains ADDRESS, HASH and SQL_ID (10g) as well as the SID column. So, if you know ADDRESS and HASH, it shouldn't be that hard to extract the information from V$OPEN_CURSOR. That table containts the information about the sessions causing you to curse because of the !@#$ SQL they execute.

-- 
http://www.mladen-gogala.com
Received on Fri May 11 2007 - 10:34:07 CDT

Original text of this message

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