Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: JDBC thin driver and sql_trace

Re: JDBC thin driver and sql_trace

From: Thomas Kellerer <spam_eater_at_gmx.net>
Date: Tue, 25 Nov 2003 11:19:48 +0100
Message-ID: <bpvaca$1th7hs$1@ID-13919.news.uni-berlin.de>


VC,

thanks for you answer.

Here is my test code:

con = DriverManager.getConnection(...)
Statement stmt = con.createStatement();
stmt.executeUpdate("ALTER SESSION set sql_trace=true"); rs = stmt.executeQuery("select * from country");

I have tried execute() instead of executeUpdate() as well.

I have tried you second suggestion as well (first one doesn't work, the keyword EVENT shouldn't be in there) and that didn't create the trace file either.

Regards
Thomas

VC schrieb:

> Hello Thomas,
>
> Did you do something like:
>
> Statement stmt = conn.createStatement();
> stmt.execute ("alter session set events sql_trace = true");
>
> or
>
> stmt.execute ("alter session set events '10046 trace name context forever,
> level 8'");
>
> If not, please post the code snippet.
>
> Rgds.
>
>
> "Thomas Kellerer" <spam_eater_at_gmx.net> wrote in message
> news:bpu0t3$cec$1_at_svr7.m-online.net...
>

>>Hello all,
>>
>>I'm trying to get sql_trace enabled from a Java based front end, which
>>connects through the JDBC thin driver to a 8.1.7 database.
>>
>>When I fire up SQL*Plus and issue ALTER SESSION SET sql_trace = true; I

>
> get
>
>>my trace files written to disk.
>>
>>When I do the same through JDBC (same user, same server, same instance)

>
> the
>
>>trace files are not written. I tried it also with a small test program but
>>still no trace file were generated.
>>
>>Am I missing something? Do I need to pass additional parameters when
>>connecting in order to get sql_trace enabled?
>>
>>I tried this with the 8.1.7 driver (classes12.zip) and the new 9.2 driver
>>(ojdbc14.jar) - no difference. JDK was 1.4.2
>>
>>Any help is greatly appreciated.
>>
>>Thanks in advance
>>Thomas
>>

>
>
>
Received on Tue Nov 25 2003 - 04:19:48 CST

Original text of this message

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