Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Obtaining request really issued to server by JDBC driver
Thanks, but now I'm facing another problem : the query that is issued
has got a binding in it ("where datefield > :1"), and I'd like to know
what the binding is replaced with. Any way I can know this ?
Thanks.
Karsten Farrell <kfarrell_at_belgariad.com> wrote in message news:<MPG.1900910ac105cdf2989733_at_news.la.sbcglobal.net>...
> ppn_at_mederic.fr said...
> > Hello,
> >
> > I'd like to know how to obtain the query that the JDBC driver sends to
> > the Oracle server. I know what query is sent to the JDBC driver
> > itself, but I need to know how it is transformed so that Oracle
> > understands it, because I have a date formatting problem (because of
> > synonyms on an older version of Oracle).
> > I'm using Oracle 8i, and the synonyms point to Oracle 7.
> >
> > Thanks.
> > P.
> >
> You could do something like:
>
> select sql_text from v$sqlarea;
>
> But if you want to be able to just see the SQL you're interested in, put
> a comment in your application's select statement ... something like:
>
> /* mystuff */ select column...
>
> Then you can modify your search to something like:
>
> select sql_text from v$sqlarea where sql_text like '/* mystuff */%';
>
> Learned this little trick from OEM, which precedes all its sql with the
> comment: "/* OracleOEM */".
Received on Mon Apr 14 2003 - 06:39:24 CDT