Re: finding a session that is running a sql



On May 11, 10:39 am, Charles Hooper <hooperc2...@xxxxxxxxx> wrote:
On May 11, 9:31 am, Ben <bal...@xxxxxxxxxxx> 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?

Just out of curiosity, what is the SQL statement that you are seeing
executed 5.5 million times a day?

You might want to check the table level trigger code in the database
for that SQL statement. The tip that David provided to you will tell
you if the problem is caused by application level code or if it is
caused by trigger code or the cost based optimizer based on the dep=
statements in the 10046 trace file. dep=0 is application code, while
dep=1, dep=2, dep=3, ... dep=n is trigger code, space management, or
cost based optimizer code.

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.

If the SQL is not a select, then you can also look into auditing the
table(s).

.



Relevant Pages

  • Re: finding a session that is running a sql
    ... I have a SQL that is consistently being executed 5.5 million times per ... I'm watching the executions in v$sqlarea ... what is the SQL statement that you are seeing ... cost based optimizer code. ...
    (comp.databases.oracle.server)
  • Re: can anyone help me tune the database
    ... CPU Elapsd ... Buffer Gets Executions Gets per Exec %Total Time Time ... The second longest running SQL statement, with 748 executions totaling ...
    (comp.databases.oracle.server)
  • Re: inactive users how find
    ... not executing a sql statement. ... LAST_CALL_ET is reset every time a sql statement is executed. ... session that is idle too long. ...
    (comp.databases.oracle.server)
  • Re: Abysmal performance of Scripting.Dictionary object on 2003 server
    ... Are these dictionary objects running at low, ... protection level or running remotely? ... Are they saved in the Session or Application objects or to files or a ... database between page executions, or are they created and rebuilt with ...
    (microsoft.public.inetserver.asp.general)
  • Re: finding a session that is running a sql
    ... crossing v$session and v$sqlarea for the statements hash value and no ... growing but can't match it to a session while it's growing. ... resulting trace files. ... as you are averaging almost 4K executions per minute. ...
    (comp.databases.oracle.server)