Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Strange 10046 behaviour when java involved.
Giovanni,
as far as I'm concerned, the oracle jvm doesn't have any reason to write to any tracefile at all unless (somehow) instructed to do so ? I've never before noticed this behaviour, but today my trace file parser choked itself on all the various output coming from java :)
Stefan
On 5/11/06, Giovanni Cuccu <giovanni.cuccu_at_gmail.com> wrote:
>
> Hi Stefan,
> my guess is that thare two different oracle internal modules writing
> to the same trace file and perhaps they are not synchronized.
> I think the best way to avoid this is using a logging api such as
> java.util.logging or log4j (an avoiding the output to the console).
> You can run more test to investigate if the output appears in
> different places when the i the java stored pro is invocated for the
> first time or not.
> Giovanni
>
> On 5/11/06, Stefan Knecht <knecht.stefan_at_gmail.com> wrote:
> > Tested on 10.2.0.2 too, same result.
> >
> > Note however, the output doesn't always appear in the same place in the
> > tracefile. Running the test repeatedly confirms this.
> >
> >
> > Stefan
> >
> >
> > On 5/11/06, Stefan Knecht <knecht.stefan_at_gmail.com> wrote:
> > >
> > > Hello list
> > >
> > > I've been using java to perform various tasks in the database for some
> > time now. However, I just noticed today that 10046 behaves quite odd in
> > conjunction with java calls.
> > >
> > > I tested this on 10.1.0.3, and am wondering if this behaviour is
> expected:
> > >
> > > create or replace and compile java source named java_test
> > > as
> > > import java.lang.*;
> > > public class java_test
> > > {
> > > public static int print_test(String foo)
> > > {
> > > try {
> > > System.out.println("hi there!\n");
> > > }
> > > finally
> > > {
> > > return 0;
> > > }
> > > }
> > > }
> > > /
> > >
> > > create or replace function run_java_test (x in varchar2) return number
> > > as
> > > language java name 'java_test.print_test( java.lang.String) return
> > integer';
> > > /
> > >
> > >
> > > alter session set events '10046 trace name context forever, level 12';
> > >
> > > select run_java_test('foo') from dual;
> > >
> > > alter session set events '10046 trace name context off';
> > >
> > > Then look at the resulting trace file :)
> > >
> > >
> > > /eva1_data2/SCANS/admin/udump/scans_ora_809282.trc
> > > Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
> > > With the Partitioning, OLAP and Data Mining options
> > > ORACLE_HOME = /eva1_data2/SCANS/oracle
> > > System name: OSF1
> > > Node name: sr-ac99-0181
> > > Release: V5.1
> > > Version: 2650
> > > Machine: alpha
> > > Instance name: SCANS
> > > Redo thread mounted by this instance: 1
> > > Oracle process number: 17
> > > Unix process pid: 809282, image: oracle_at_sr-ac99-0181 (TNS V1-V3)
> > >
> > > *** 2006-05-11 11:05:30.399
> > > *** SERVICE NAME:(SYS$USERS) 2006-05-11 11:05:30.394
> > > *** SESSION ID:(529.6213) 2006-05-11 11:05: 30.394
> > > hi there!
> > > *** 2006-05-11 11:05:47.648
> > > =====================
> > > PARSING IN CURSOR #14 len=69 dep=0 uid=0 oct=42 lid=0 tim=983910284288
> > hv=3164292706 ad='10920648'
> > > alter session set events '10046 trace name context forever, level 12'
> > > END OF STMT
> > > EXEC
> > #14:c=0,e=0,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=983910284288
> > > WAIT #14: nam='SQL*Net message to client' ela= 1024 p1=1650815232 p2=1
> > p3=0
> > > WAIT #14: nam='SQL*Net message from client' ela= 7168 p1=1650815232
> p2=1
> > p3=0
> > > =====================
> > >
> > > anyone experience this before ??
> > >
> > >
> > >
> > > Stefan
> > >
> >
> >
>
>
> --
> --------------------------------------------------------------------
> Another free oracle resource profiler
> http://sourceforge.net/projects/oraresprof/
> Now version 0.9
>
-- http://www.freelists.org/webpage/oracle-lReceived on Thu May 11 2006 - 04:40:48 CDT
![]() |
![]() |