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: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Fri, 11 Apr 2003 16:45:37 GMT
Message-ID: <MPG.1900910ac105cdf2989733@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
Received on Fri Apr 11 2003 - 11:45:37 CDT

Original text of this message

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