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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Strange 10046 behaviour when java involved.

Re: Strange 10046 behaviour when java involved.

From: Stefan Knecht <knecht.stefan_at_gmail.com>
Date: Thu, 11 May 2006 13:07:10 +0200
Message-ID: <486b2b610605110407l786f1ef3od9b8831c686aa059@mail.gmail.com>


You're right!

My experience with java is a bit limited. I just figured it was a bit "rude" to invade a specific trace file created by a specific event. But apparently that's the way it works.

Thanks for your input

Stefan

On 5/11/06, Edgar Chupit <chupit_at_gmail.com> wrote:
>
> Hello Stefan,
>
> This is a expected behavior. Oracle JVM associates it's System.out and
> System.err output streams with trace files. The same way behaves
> different Java Application Servers, because if they would not do this,
> than the output generated via System.out would be simple lost, because
> there is not terminal to output to, when java procedure/function is
> called.
>
> There can be also many different information in trace file besides
> 10046 trace information, if you will enable other trace events, when
> trace 10046 enabled.
>
> 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
> >
>
>
> --
> Best regards,
> Edgar Chupit
> callto://edgar.chupit
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 11 2006 - 06:07:10 CDT

Original text of this message

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