Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to find the SQL statement in V$SQLAREA with bind variable
"dominica_at_gmail.com" <dominica_at_gmail.com> wrote in
news:1115084725.713064.277720_at_f14g2000cwb.googlegroups.com:
> Hi All,
>
>
> I have this task.
>
> Basically, I have find a bunch of frequently RUN SQL statements in the
> database. (later on to run explain plan on them).
>
> I am running statspak and I do know some sql statements that run a lot
> in the database.
>
> My problem is I could find the HASH_VALUE, I could go to
> V$SQL or V$SQLAREA to find the SQL STATEMENT, but the
> SQL statement I find has BIND variables.
>
> Now, my question is how to find those BIND varaible related to
> that particular SQL statements.
>
> SELECT ABC.CONDITION, DDD.S_ADDED_P
> FROM SEG_RULE_SQL ABC,
> SEG_RULE DDD
> WHERE DDD.SEGMENT_ID = :b1
> AND DDD.RULE_ID = ABC.RULE_ID
> AND ABC.QUERY_TYPE = :b2
> AND DDD.SEGMENT_ID != :b3
> ORDER BY DECODE(S_ADDED_P,'t',0,1),DDD.DISPLAY_ORDER
>
>>From which V$SQL???
Do some research on EVENT 10046 with a value of 12; Received on Mon May 02 2005 - 21:17:10 CDT
![]() |
![]() |