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: Obtaining request really issued to server by JDBC driver

Re: Obtaining request really issued to server by JDBC driver

From: Paul Brewer <paul_at_paul.brewers.org.uk>
Date: Sat, 12 Apr 2003 18:20:37 +0100
Message-ID: <3e985052_3@mk-nntp-1.news.uk.worldonline.com>


"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 */".
> --
> /Karsten
> DBA > retired > DBA

Karsten,

What a brilliant idea! So simple! Or was everyone else ahead of me here?

Thanks for that one. I'll put it to use.

Regards,
Paul Received on Sat Apr 12 2003 - 12:20:37 CDT

Original text of this message

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